Image decoding method and image decoding apparatus for sample adaptive offset information

ABSTRACT

An image coding method includes performing: context arithmetic coding to consecutively code (i) first information indicating whether or not to perform SAO processing for a first region and (ii) second information indicating whether or not to use, in the SAO processing for the first region, information on SAO processing for a region except the first region; and bypass arithmetic coding to code other information after the first and second information are coded. The other information includes third information indicating whether the SAO processing is edge or band offset processing. In the performing of context arithmetic coding, an initial bit value in a bit string of a parameter indicating a type of the SAO processing is coded as the first information. In the performing of bypass arithmetic coding, a value of a next bit following the initial bit in the bit string of the parameter is coded as the third information.

CROSS REFERENCE TO RELATED APPLICATION

The present application claims the benefit of U.S. Provisional PatentApplication No. 61/664,870 filed Jun. 27, 2012. The entire disclosure ofthe above-identified application, including the specification, drawingsand claims is incorporated herein by reference in its entirety.

FIELD

The present disclosure relates to an image coding method usingarithmetic coding.

BACKGROUND

There are techniques described in Non Patent Literature (NPL) 1 and NPL2 which relate to the image coding method using arithmetic coding.

CITATION LIST Non Patent Literature

-   [NPL 1]    -   ISO/IEC 14496-10 “MPEG-4 Part 10 Advanced Video Coding”-   [NPL 2]    -   Frank Bossen, “Common test conditions and software reference        configurations”, JCTVC-H1100, Joint Collaborative Team on Video        Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11 8th        Meeting, San Jose, Calif., USA, 1-10 February, 2012,        http://phenix.it-sudparis.eu/jct/doc_end_user/documents/8_San%        20Jose/wg11/JCTVCH1100-v1.zip

SUMMARY Technical Problem

However, when coding is performed with poor processing efficiency, it isdifficult to suppress processing delay that occurs during the coding.

In view of the above, one non-limiting and exemplary embodiment providesan image coding method which allows coding with high coding efficiency.

Solution to Problem

An image coding method according to an aspect of the present disclosureincludes: performing context arithmetic coding to consecutively code (i)first information indicating whether or not to perform sample adaptiveoffset (SAO) processing for a first region of an image and (ii) secondinformation indicating whether or not to use, in the SAO processing forthe first region, information on SAO processing for a region other thanthe first region, the context arithmetic coding being arithmetic codingusing a variable probability, the SAO processing being offset processingon a pixel value; and performing bypass arithmetic coding to code otherinformation which is information on the SAO processing for the firstregion and different from the first information or the secondinformation, after the first information and the second information arecoded, the bypass arithmetic coding being arithmetic coding using afixed probability, wherein the other information includes thirdinformation indicating whether the SAO processing for the first regionis edge offset processing performed according to an edge, or band offsetprocessing performed according to the pixel value, in the performing ofcontext arithmetic coding, a value of an initial bit in a bit string ofa parameter is coded as the first information, the parameter indicatinga type of the SAO processing for the first region, and in the performingof bypass arithmetic coding, a value of a next bit following the initialbit in the bit string of the parameter is coded as the thirdinformation.

It is to be noted that these general and specific aspects may beimplemented using a system, an apparatus, an integrated circuit, acomputer program, or a non-transitory computer-readable recording mediumsuch as a CD-ROM, or any combination of systems, apparatuses, methodsintegrated circuits, computer programs, or recording media.

Additional benefits and advantages of the disclosed embodiments will beapparent from the Specification and Drawings. The benefits and/oradvantages may be individually obtained by the various embodiments andfeatures of the Specification and Drawings, which need not all beprovided in order to obtain one or more of such benefits and/oradvantages.

Advantageous Effects

An image coding method according to the present disclosure allows codingwith high coding efficiency.

BRIEF DESCRIPTION OF DRAWINGS

These and other objects, advantages and features of the disclosure willbecome apparent from the following description thereof taken inconjunction with the accompanying drawings that illustrate a specificembodiment of the present disclosure.

FIG. 1 is a block diagram which illustrates an example of aconfiguration of an image coding apparatus according to Embodiment 1.

FIG. 2 is a block diagram which illustrates an example of aconfiguration of an image decoding apparatus according to Embodiment 1.

FIG. 3 is a schematic view which illustrates an example of an edgeoffset according to Embodiment 1.

FIG. 4 is a schematic view which illustrates categories of the edgeoffset according to Embodiment 1.

FIG. 5 is a schematic view which illustrates examples of types of theedge offset according to Embodiment 1.

FIG. 6 is a schematic view which illustrates an example of band offsetaccording to Embodiment 1.

FIG. 7 is a schematic view which illustrates categories of the bandoffset according to Embodiment 1.

FIG. 8 is a schematic view which illustrates coding target informationof the band offset according to Embodiment 1.

FIG. 9A is a schematic view which illustrates an example of the processof dividing a region according to Embodiment 1.

FIG. 9B is a schematic view which illustrates an example of the resultof dividing a region according to Embodiment 1.

FIG. 10 is a block diagram illustrating an example of a configuration ofa loop filtering unit in the image coding apparatus according toEmbodiment 1.

FIG. 11 is a block diagram illustrating an example of a configuration ofa loop filtering unit in the image decoding apparatus according toEmbodiment 1.

FIG. 12 is a flowchart illustrating an example of operations of the loopfiltering unit in the image coding apparatus according to Embodiment 1.

FIG. 13 is a flowchart illustrating an example of operations of the loopfiltering unit in the image decoding apparatus according to Embodiment1.

FIG. 14 is a schematic view which illustrates an example of bitallocation to index numbers each indicating a pixel classifying methodaccording to Embodiment 1.

FIG. 15 is a schematic view which illustrates an example of a codedstream according to Embodiment 1.

FIG. 16A is a schematic view which illustrates an example of syntax(aps_sao_param) in APS according to Embodiment 1.

FIG. 16B is a schematic view which illustrates an example of syntax(aps_unit_vlc) in APS according to Embodiment 1.

FIG. 16C is a schematic view which illustrates an example of syntax(sao_offset_vlc) in APS according to Embodiment 1.

FIG. 17A is a schematic view which illustrates an example of syntax(slice_data) in slice data according to Embodiment 1.

FIG. 17B is a schematic view which illustrates an example of syntax(sao_unit_cabac) in slice data according to Embodiment 1.

FIG. 17C is a schematic view which illustrates an example of syntax(sao_offset_cabac) in slice data according to Embodiment 1.

FIG. 18 is a schematic view which illustrates an example of regionsbetween which offset information is shared according to Embodiment 1.

FIG. 19 is a flowchart which illustrates an example of coding of anindex number which indicates a pixel classifying method according toEmbodiment 1.

FIG. 20 is a flowchart which illustrates an example of decoding an indexnumber which indicates the pixel classifying method according toEmbodiment 1.

FIG. 21 is a block diagram illustrating an example of a configuration ofa loop filtering unit in the image coding apparatus according toEmbodiment 2.

FIG. 22 is a block diagram illustrating an example of a configuration ofa loop filtering unit in the image decoding apparatus according toEmbodiment 2.

FIG. 23 is a flowchart illustrating an example of operations of the loopfiltering unit in the image coding apparatus according to Embodiment 2.

FIG. 24 is a flowchart illustrating an example of operations of the loopfiltering unit in the image decoding apparatus according to Embodiment2.

FIG. 25 is a schematic view which illustrates an example of bitallocation to index numbers each indicating a pixel classifying methodaccording to Embodiment 2.

FIG. 26 is a schematic view which illustrates an example of bitallocation to index numbers each indicating a pixel classifying methodaccording to Embodiment 2.

FIG. 27A is a schematic view which illustrates an example of syntax(sao_unit_vlc) in APS according to Embodiment 2.

FIG. 27B is a schematic view which illustrates an example of syntax(sao_offset_vlc) in APS according to Embodiment 2.

FIG. 27C is a schematic view which illustrates an example of allocationof a context index to offset information in APS according to Embodiment2.

FIG. 27D is a flowchart which illustrates an example of coding of offsetinformation in APS according to Embodiment 2

FIG. 27E is a flowchart which shows an example of decoding of offsetinformation in APS according to Embodiment 2.

FIG. 28A is a schematic view which illustrates an example of syntax(sao_unit_cabac) in slice data according to Embodiment 2.

FIG. 28B is a schematic view which illustrates an example of syntax(sao_offset_cabac) in slice data according to Embodiment 2.

FIG. 28C is a schematic view which illustrates an example of allocationof a context index to offset information in slice data according toEmbodiment 2.

FIG. 28D is a flowchart which illustrates an example of coding of offsetinformation in slice data according to Embodiment 2

FIG. 28E is a flowchart which shows an example of decoding of offsetinformation in slice data according to Embodiment 2.

FIG. 29 is a flowchart which illustrates an example of coding of anindex number which indicates a pixel classifying method according toEmbodiment 2.

FIG. 30 is a flowchart which illustrates an example of decoding an indexnumber which indicates the pixel classifying method according toEmbodiment 2.

FIG. 31 is a block diagram which illustrates an example of aconfiguration of an offset information coding unit according toEmbodiment 3.

FIG. 32 is a block diagram which illustrates an example of aconfiguration of an offset information decoding unit according toEmbodiment 3.

FIG. 33 is a schematic view which illustrates allocation of a contextindex to offset information according to the first example of Embodiment3.

FIG. 34 is a flowchart which illustrates operations of the offsetinformation coding unit according to the first example of Embodiment 3.

FIG. 35 is a flowchart which illustrates operations of the offsetinformation decoding unit according to the first example of Embodiment3.

FIG. 36A is a schematic view which illustrates allocation of a contextindex to offset information according to the second example ofEmbodiment 3.

FIG. 36B is a schematic view which illustrates bit allocation to indexnumbers each indicating a pixel classifying method according to thesecond example of Embodiment 3.

FIG. 36C is a diagram which shows an objective performance of an imagecoding apparatus and an image decoding apparatus according to the secondexample of Embodiment 3.

FIG. 37 is a flowchart which illustrates operations of the offsetinformation coding unit according to the second example of Embodiment 3.

FIG. 38 is a flowchart which illustrates operations of the offsetinformation decoding unit according to the second example of Embodiment3.

FIG. 39A is a schematic view which illustrates allocation of a contextindex to offset information according to the third example of Embodiment3.

FIG. 39B is a diagram which shows an objective performance of an imagecoding apparatus and an image decoding apparatus according to the thirdexample of Embodiment 3.

FIG. 40 is a flowchart which illustrates operations of the offsetinformation coding unit according to the third example of Embodiment 3.

FIG. 41 is a flowchart which illustrates operations of the offsetinformation decoding unit according to the third example of Embodiment3.

FIG. 42 is a flowchart which illustrates an example of a feature ofcoding according to Embodiment 3.

FIG. 43 is a flowchart which illustrates an example of a feature ofdecoding according to Embodiment 3.

FIG. 44 shows an overall configuration of a content providing system forimplementing content distribution services.

FIG. 45 shows an overall configuration of a digital broadcasting system.

FIG. 46 shows a block diagram illustrating an example of a configurationof a television.

FIG. 47 shows a block diagram illustrating an example of a configurationof an information reproducing/recording unit that reads and writesinformation from and on a recording medium that is an optical disk.

FIG. 48 shows an example of a configuration of a recording medium thatis an optical disk.

FIG. 49A shows an example of a cellular phone.

FIG. 49B is a block diagram showing an example of a configuration of acellular phone.

FIG. 50 illustrates a structure of multiplexed data.

FIG. 51 schematically shows how each stream is multiplexed inmultiplexed data.

FIG. 52 shows how a video stream is stored in a stream of PES packets inmore detail.

FIG. 53 shows a structure of TS packets and source packets in themultiplexed data.

FIG. 54 shows a data structure of a PMT.

FIG. 55 shows an internal structure of multiplexed data information.

FIG. 56 shows an internal structure of stream attribute information.

FIG. 57 shows steps for identifying video data.

FIG. 58 shows an example of a configuration of an integrated circuit forimplementing the moving picture coding method and the moving picturedecoding method according to each of embodiments.

FIG. 59 shows a configuration for switching between driving frequencies.

FIG. 60 shows steps for identifying video data and switching betweendriving frequencies.

FIG. 61 shows an example of a look-up table in which video datastandards are associated with driving frequencies.

FIG. 62A is a diagram showing an example of a configuration for sharinga module of a signal processing unit.

FIG. 62B is a diagram showing another example of a configuration forsharing a module of the signal processing unit.

DESCRIPTION OF EMBODIMENTS Underlying Knowledge Forming Basis of thePresent Disclosure

The inventors have found a problem in the image coding method usingarithmetic coding which is described in “Background”. The followingdescribes the details.

An image coding apparatus according to an image coding systemrepresented by the ITU-T standard called H.26x and the ISO/IEC standardcalled MPEG-x divides a picture into predetermined units and performscoding by the unit. For example, an image coding apparatus according tothe H.264/MPEG-4 AVC standard (NPL 1) performs a process by a unitcalled a macroblock having 16 horizontal pixels and vertical 16 pixels.

The image coding apparatus divides the macroblock into sub blocks (eachhaving at least 4 horizontal pixels and 4 vertical pixels), whenperforming motion compensation. The image coding apparatus performsmotion compensation using a motion vector that is different for each ofthe sub blocks, performs frequency transformation on a difference signalbetween an original signal and a prediction signal, collects informationon the difference signal in a low-frequency region, and performsquantization, thereby compressing information.

It is known that grid-like distortion called block distortion appears ata boundary of blocks according to a method for coding a picture on ablock-by-block basis using orthogonal transformation such as DCT whichcollects information on a difference signal in a low-frequency region.The image coding apparatus is capable of reducing the blocking effectsby performing deblocking filtering processing.

However, with the system which processes only the block boundary as withthe above-described deblocking filter, there is difficulty in reducingcoding deterioration other than the block distortion.

In view of the above, an image coding method according to an aspect ofthe present disclosure includes: An image coding method comprising:performing context arithmetic coding to consecutively code (i) firstinformation indicating whether or not to perform sample adaptive offset(SAO) processing for a first region of an image and (ii) secondinformation indicating whether or not to use, in the SAO processing forthe first region, information on SAO processing for a region other thanthe first region, the context arithmetic coding being arithmetic codingusing a variable probability, the SAO processing being offset processingon a pixel value; and performing bypass arithmetic coding to code otherinformation which is information on the SAO processing for the firstregion and different from the first information or the secondinformation, after the first information and the second information arecoded, the bypass arithmetic coding being arithmetic coding using afixed probability, wherein the other information includes thirdinformation indicating whether the SAO processing for the first regionis edge offset processing performed according to an edge, or band offsetprocessing performed according to the pixel value, in the performing ofcontext arithmetic coding, a value of an initial bit in a bit string ofa parameter is coded as the first information, the parameter indicatinga type of the SAO processing for the first region, and in the performingof bypass arithmetic coding, a value of a next bit following the initialbit in the bit string of the parameter is coded as the thirdinformation.

With this, in a parameter of the SAO processing for improving an imagequality, the context arithmetic coding is applied to a portion in whichit is suitable to use the context arithmetic coding, and the bypassarithmetic coding is applied to a portion in which it is suitable to usethe bypass arithmetic coding. Furthermore, the context arithmetic codingis consecutively performed. This means that frequent switching betweenthe context arithmetic coding and the bypass arithmetic coding issuppressed and processes of the same type are consecutively performed.Thus, the processing efficiency improves.

For example, in the performing of context arithmetic coding, the firstinformation may be coded after the second information is coded.

With this, it is possible to code, immediately after coding a value ofan initial bit included in a parameter by the context arithmetic coding,a value of the next bit included in the parameter, while maintaining theconsecutiveness of the context arithmetic coding. This reducescomplicated processes to be performed on a parameter, and thus theprocessing efficiency improves.

In addition, for example, in the performing of bypass arithmetic coding,the other information may be coded which includes fourth informationindicating an absolute value of an offset value.

With this, a variety of information items are coded by the bypassarithmetic coding after the context arithmetic coding. In sum, processesof the same type are collectively performed. Thus, the processingefficiency improves.

In addition, for example, in the performing of bypass arithmetic coding,when the SAO processing for the first region is the band offsetprocessing, the other information may be coded which includes (i) fifthinformation indicating whether the offset value is positive or negativeand (ii) sixth information indicating a scope of application of theoffset value.

With this, a further variety of information items are coded by thebypass arithmetic coding according to the state, after the contextarithmetic coding. Thus, the processing efficiency improves.

In addition, for example, in the performing of context arithmeticcoding, the second information may be coded which includes at least oneof (i) information indicating whether or not information on SAOprocessing for a left region is used in the SAO processing for the firstregion and (ii) information indicating whether or not information on SAOprocessing for an upper region is used in the SAO processing for thefirst region, the left region being adjacent to the first region andbeing to the left of the first region, the upper region being adjacentto the first region and being on top of the first region.

With this, in the context arithmetic coding that is consecutivelyperformed, information indicating the reuse from above or left isproperly coded.

In addition, an image decoding method according to an aspect of thepresent disclosure may be an image decoding method including: performingcontext arithmetic decoding to consecutively decode (i) firstinformation indicating whether or not to perform sample adaptive offset(SAO) processing for a first region of an image and (ii) secondinformation indicating whether or not to use, in the SAO processing forthe first region, information on SAO processing for a region other thanthe first region, the context arithmetic decoding being arithmeticdecoding using a variable probability, the SAO processing being offsetprocessing on a pixel value; and performing bypass arithmetic decodingto decode other information which is information on the SAO processingfor the first region and different from the first information or thesecond information, after the first information and the secondinformation are decoded, the bypass arithmetic decoding being arithmeticdecoding using a fixed probability, wherein the other informationincludes third information indicating whether the SAO processing for thefirst region is edge offset processing performed according to an edge,or band offset processing performed according to the pixel value, in theperforming of context arithmetic decoding, a value of an initial bit ina bit string of a parameter is decoded as the first information, theparameter indicating a type of the SAO processing for the first region,and in the performing of bypass arithmetic decoding, a value of a nextbit following the initial bit in the bit string of the parameter isdecoded as the third information.

With this, in a parameter of the SAO processing for improving an imagequality, the context arithmetic decoding is applied to a portion inwhich it is suitable to use the context arithmetic decoding, and thebypass arithmetic decoding is applied to a portion in which it issuitable to use the bypass arithmetic decoding. Furthermore, the contextarithmetic decoding is consecutively performed. More specifically,frequent switching between the context arithmetic decoding and thebypass arithmetic decoding is suppressed and processes of the same typeare consecutively performed. Thus, the processing efficiency improves.

For example, in the performing of context arithmetic decoding, the firstinformation may be decoded after the second information is decoded.

With this, it is possible to decode, immediately after decoding a valueof an initial bit included in a parameter by the context arithmeticdecoding, a value of the next bit included in the parameter, whilemaintaining the consecutiveness of the context arithmetic decoding. Thisreduces complicated processes to be performed on a parameter, and thusthe processing efficiency improves.

In addition, for example, in the performing of bypass arithmeticdecoding, the other information may be decoded which includes fourthinformation indicating an absolute value of an offset value.

With this, a variety of information items are decoded by the bypassarithmetic decoding after the context arithmetic decoding. In sum,processes of the same type are collectively performed. Thus, theprocessing efficiency improves.

In addition, for example, in the performing of bypass arithmeticdecoding, when the SAO processing for the first region is the bandoffset processing, the other information may be decoded which includes(i) fifth information indicating whether the offset value is positive ornegative and (ii) sixth information indicating a scope of application ofthe offset value.

With this, a further variety of information items are decoded by thebypass arithmetic decoding according to the state after the contextarithmetic decoding. Thus, the processing efficiency improves.

In addition, for example, in the performing of context arithmeticdecoding, the second information may be decoded which includes at leastone of (i) information indicating whether or not information on SAOprocessing for a left region is used in the SAO processing for the firstregion and (ii) information indicating whether or not information on SAOprocessing for an upper region is used in the SAO processing for thefirst region, the left region being adjacent to the first region andbeing to the left of the first region, the upper region being adjacentto the first region and being on top of the first region.

With this, in the context arithmetic decoding that is consecutivelyperformed, information indicating the reuse from above or left in thecontext arithmetic decoding is properly decoded.

It is to be noted that general and specific aspects disclosed above maybe implemented using a system, an apparatus, an integrated circuit, acomputer program, or a non-transitory computer-readable recording mediumsuch as a CD-ROM, or any combination of systems, apparatuses, methodsintegrated circuits, computer programs, or recording media.

The following describes embodiments in detail with reference todrawings. It is to be noted that each of the embodiments described belowshows a general or specific example. The numerical values, shapes,materials, structural elements, the arrangement and connection of thestructural elements, steps, the processing order of the steps etc. shownin the following embodiments are mere examples, and therefore do notlimit the scope of the Claims. Therefore, among the structural elementsin the following embodiments, structural elements not recited in any oneof the independent claims are described as arbitrary structuralelements.

In addition, the term “coding” in the following description may be usedto mean “encoding”.

Embodiment 1

FIG. 1 illustrates a configuration of an image coding apparatusaccording to Embodiment 1. An image coding apparatus 100 illustrated inFIG. 1 includes a control unit 110 and a coding unit 120. The codingunit 120 includes: a subtractor 121; a frequency transforming unit 122;a quantization unit 123; an entropy coding unit 124; an inversequantization unit 125; an inverse frequency transforming unit 126; anadder 127; a loop filtering unit 128; a storage unit 129; an intraprediction unit 130; a motion compensation unit 131; a motion estimationunit 132; and a switch 133.

The coding unit 120 codes an image 141 on a block-by-block basis togenerate a coded stream 142. At this time, the subtractor 121 in thecoding unit 120 subtracts a pixel block having plural pixel values of aprediction image, from a pixel block having plural pixel values of theimage 141. The frequency transforming unit 122 transforms a pixel blockresulting from the subtraction into a coefficient block having pluralfrequency coefficients. The quantization unit 123 quantizes thecoefficient block obtained from the frequency transforming unit 122.

Meanwhile, the motion estimation unit 132 detects a motion vector usingthe pixel block of the image 141. The motion compensation unit 131performs inter picture prediction (inter prediction) using a referenceimage in the storage unit 129 and the motion vector detected by themotion estimation unit 132. The intra prediction unit 130 performs intrapicture prediction (intra prediction) using the pixel block obtainedfrom the adder 127, according to an intra prediction mode. The switch133 inputs the pixel block of the prediction image resulting from theintra picture prediction or the inter picture prediction, to thesubtractor 121 and the adder 127.

The entropy coding unit 124 performs entropy coding on partitioninformation of a block, a type of prediction, a motion vector, aprediction mode (intra picture prediction mode), a quantizationparameter, the quantized coefficient block, and so on, to generate thecoded stream 142.

In addition, the inverse quantization unit 125 performs inversequantization on the quantized coefficient block. In addition, theinverse frequency transforming unit 126 transforms the coefficient blockon which inverse quantization is performed, into a pixel block. Theadder 127 adds the pixel block of the prediction image to the pixelblock obtained from the inverse frequency transforming unit 126. Theloop filtering unit 128 suppresses distortion in the pixel blockobtained in the adder 127, and stores the pixel block as a referenceimage in the storage unit 129.

Furthermore, the control unit 110 controls the coding unit 120.

The image coding apparatus 100 codes the image 141 through the operationdescribed above. In addition, the image coding apparatus 100 reduces adata amount of the coded stream 142 through a variety of processes suchas frequency transformation, quantization, intra picture prediction,inter picture prediction, entropy coding, loop filtering, and so on.

FIG. 2 illustrates a configuration of an image decoding apparatus 200corresponding to the image coding apparatus 100 illustrated in FIG. 1.The image decoding apparatus 200 illustrated in FIG. 2 includes acontrol unit 210 and a decoding unit 220. The decoding unit 220includes: an entropy decoding unit 224; an inverse quantization unit225; an inverse frequency transforming unit 226; an adder 227; a loopfiltering unit 228; a storage unit 229; an intra picture prediction unit230; a motion compensation unit 231; and a switch 233.

The decoding unit 220 decodes, on a block-by-block basis, an image 241included in a coded stream 242. At this time, the entropy decoding unit224 in the decoding unit 220 performs entropy decoding on the codedstream 242, thereby obtaining partition information of a block, a typeof prediction, a motion vector, an intra picture prediction mode, aquantization parameter, a quantized coefficient block, and so on.

Then, the control unit 210 controls operation performed by the decodingunit 220.

The inverse quantization unit 225 in the decoding unit 220 performsinverse quantization on the quantized coefficient block. The inversefrequency transforming unit 226 transforms the coefficient block onwhich inverse quantization is performed, into a pixel block.

The adder 227 adds the pixel block of the prediction image to the pixelblock obtained from the inverse frequency transforming unit 226. Theloop filtering unit 228 suppresses distortion in the pixel blockobtained from the adder 227. Then, the loop filtering unit 228 stores areference image including pixel blocks in the storage unit 229.Furthermore, the loop filtering unit 228 outputs an image 241 includingpixel blocks.

When the type of prediction is intra picture prediction, the intraprediction unit 230 performs intra picture prediction using the pixelblock obtained from the adder 227, according to an intra predictionmode. When the type of prediction is inter picture prediction, themotion compensation unit 231 performs inter picture prediction using themotion vector and the reference image in the storage unit 229. Theswitch 233 inputs the pixel block of the prediction image resulting fromthe intra picture prediction or the inter picture prediction, to theadder 227.

The image decoding unit 200 decodes, on a block-by-block basis, theimage 241 included in a coded stream 242 through the operationcorresponding to the operation performed by the image coding apparatus100.

The following describes loop filtering in more detail. The loopfiltering is processing for reducing coding deterioration in areconstructed signal, and according to H.264/MPEG-4 AVC standard (seeNon Patent Literature (NPL) 1), a deblocking filtering for reducingblock distortion which occurs at a macroblock boundary is performed.

However, deblocking filtering does not solve coding deteriorationoccurring in a macroblock. In view of this, offset processing is carriedout for reducing coding deterioration according to this embodiment. Theoffset processing adds an offset value to a pixel included in a currentblock to be processed in a reconstructed signal, thereby reducingdistortion from an original signal.

Furthermore, in the offset processing, pixels in the current block areclassified into a plurality of categories and an offset value that iscommon for each category is used. Methods of classifying pixels include(i) an edge offset pixel classifying method which is performed bycomparing a target pixel for classification with an adjacent pixelthereof and (ii) a band offset pixel classifying method which isperformed according to a pixel value of the target pixel forclassification. The edge offset is an offset performed according to anedge, and the band offset is an offset performed according to a pixelvalue.

In the following description, using the pixel classifying method of theedge offset is described as that the pixel classifying method is theedge offset, or as using the edge offset for the pixel classifyingmethod, in some cases. Likewise, using the pixel classifying method ofthe band offset is described as that the pixel classifying method is theband offset, or as using the band offset for the pixel classifyingmethod, in some cases.

FIG. 3 is a schematic view illustrating an example of the pixelclassifying method using the edge offset. In the edge offset,classification is performed using a magnitude relationship between acurrent pixel c to be classified and adjacent pixels c1 and c2 locatedat the left and the right, respectively, of the pixel c.

FIG. 4 is a schematic view illustrating an example of classifying ablock to be processed into five categories by the edge offset. Forexample, when a pixel value of c is larger than a pixel value of c1 andequal to a pixel value of c2, the current pixel is classified into acategory 3 and an offset value Offset [3] allocated to the category 3 isadded.

In addition, as illustrated in FIG. 5, pixels that are compared with thetarget pixel to be classified in the edge offset are right and leftadjacent pixels (EO (0)), upper and lower adjacent pixels (EO (1)),obliquely adjacent pixels (EO (2) or EO (3)), a combination of them (EO(4) or EO (5)), and so on.

FIG. 6 is a schematic view illustrating an example of the pixelclassifying method using the band offset. Here, gradations which thecurrent pixel value to be processed possibly takes are evenly dividedinto M. M is 32, for example. The gradation segments resulting from thedivision represent categories. The current pixel to be processed isclassified into a category in which the pixel value is included.

FIG. 7 is a schematic view illustrating an example of classifying blocksto be processed into 16 classes by the band offset. For example, when apixel value of c is larger than or equal to R9 and smaller than R10, thecurrent pixel to be processed is classified into a category 9 and anoffset value Offset [9] allocated to the category 9 is added.

In addition, it is not necessary to allocate an offset value to all ofthe categories, and as illustrated in FIG. 8, the image coding apparatus100 is capable of coding only the offset value for a category having ahigh offset effect. At this time, the image coding apparatus 100 codestogether a category index number that indicates a category of the codedoffset value.

In addition, a sample adaptive offset (SAO) determines an optimal pixelclassifying method and an optimal offset value to a unit of a targetregion to be processed that is obtained by hierarchically dividing ablock, as illustrated in FIG. 9A. FIG. 9B illustrates an example of adivision pattern.

FIG. 10 is a block diagram illustrating an example of a configuration ofthe loop filtering unit 128 in the image coding apparatus 100 accordingto this embodiment.

The loop filtering unit 128 includes: a signal obtaining unit 151; anoffset information calculating unit 152; an offset processing unit 153;an offset information coding unit 154; and a signal outputting unit 155.

The signal obtaining unit 151 obtains a reconstructed pixel signal in atarget region to be processed.

The offset information calculating unit 152 calculates offsetinformation for use in offset processing, such as a division pattern, apixel classifying method, an offset value, and so on.

The offset processing unit 153 classifies, into the categories, pixelsin a target region to be processed using the offset information, andperforms offset processing for each of the categories.

The offset information coding unit 154 outputs the offset information tothe entropy coding unit 124 illustrated in FIG. 1. It is to be notedthat the offset information coding unit 154 may code the offsetinformation. In addition, the offset information coding unit 154 may beincluded in the entropy coding unit 124.

The signal outputting unit 155 outputs a pixel signal in the targetregion, on which the offset processing is performed.

FIG. 11 is a block diagram illustrating an example of a configuration ofthe loop filtering unit 228 in the image decoding apparatus 200according to this embodiment.

The loop filtering unit 228 includes: a signal obtaining unit 251; anoffset information decoding unit 252; an offset processing unit 253; anda signal outputting unit 254.

The signal obtaining unit 251 obtains a reconstructed pixel signal in atarget region to be processed

The offset information decoding unit 252 obtains the offset informationfor use in the offset processing, such as the division pattern, thepixel classifying method, the offset value, and so on. It is to be notedthat the offset information decoding unit 252 may decode the offsetinformation. In addition, the offset information decoding unit 252 maybe included in the entropy decoding unit 224.

The offset processing unit 253 classifies, into categories, pixels in atarget region to be processed using the offset information, and performsthe offset processing for each of the categories.

The signal outputting unit 254 outputs a pixel signal in the targetregion, on which the offset processing is performed.

FIG. 12 is a flowchart illustrating operations performed mainly by theloop filtering unit 128 illustrated in FIG. 10, of the image codingapparatus 100 illustrated in FIG. 1.

First, the signal obtaining unit 151 obtains, from the adder 127, areconstructed pixel signal in a target region to be processed. Next, theoffset information calculating unit 152 calculates the offsetinformation for use in the offset processing, such as the divisionpattern, the pixel classifying method, the offset value, and so on(S152). Next, the offset processing unit 153 divides the region based onthe offset information, classifies pixels in the divisional region intocategories, and adds an offset value for each of the categories (S153).

Next, the offset information coding unit 154 outputs, to the entropycoding unit 124, the offset information such as the division pattern,the pixel classifying method, a category index number, the offset value,and so on. The entropy coding unit 124 codes the offset information, andinserts the coded offset information into a coded stream (S154). It isto be noted that the offset information coding unit 154 may code theoffset information and insert the coded offset information into thecoded stream.

Next, the signal outputting unit 155 outputs, to the storage unit 129, apixel signal in the target region, on which the offset processing isperformed (S155).

FIG. 13 is a flowchart illustrating operations performed by the loopfiltering unit 228 illustrated in FIG. 11, of the image decodingapparatus 200 illustrated in FIG. 2.

First, the signal obtaining unit 251 obtains, from the adder 227, areconstructed pixel signal in a target region to be processed.

Next, the entropy decoding unit 224 decodes, from the coded stream, theoffset information such as the division pattern, the pixel classifyingmethod, the category index number, the offset value, and so on, and theoffset information decoding unit 252 obtains the decoded offsetinformation (S252). It is to be noted that the offset informationdecoding unit 252 may decode the offset information from the codedstream.

Next, the offset processing unit 253 divides the region based on theoffset information, classifies pixels in the divisional region intocategories, and adds an offset value for each of the categories (S253).Next, the signal outputting unit 254 outputs, to the storage unit 229, apixel signal in the target region, on which the offset processing isperformed (S254).

Here, coding and decoding of the offset information in the offsetinformation coding unit 154 and the offset information decoding unit 252will be described in more detail. The pixel classifying methods in theoffset processing include, for example, five types of methods of EO(0),EO(1), EO(2), and EO(3) for the edge offset, and BO(0) for the bandoffset.

FIG. 14 illustrates an example of allocating index numbers whichillustrates the respective pixel classifying methods. In FIG. 14, theindex numbers are each binarized such that a small value has a small bitlength and a large value has a large bit length, and the maximum bitlength is specified as five bits. However, the method of allocation isnot limited to this. For example, the maximum bit length may not bespecified, and instead, all of the index numbers may be allocated withbits such that the last bit is 0.

In addition, information indicating that the offset processing is not tobe performed on a current block to be processed is allocated to theindex number 0.

The image coding apparatus 100 according to Embodiment 1 generates acoded stream by coding video. As illustrated in FIG. 15, the codedstream includes a header portion such as SPS (Sequence Parameter Set),PPS (Picture Parameter Set), and so on, and picture data that is codedimage data.

The picture data further includes a slice header (SH) and slice data.The slice data includes coded image data included in a slice. The slicedata further includes a block header (BH) and block data. The block dataincludes coded image data included in a block.

Furthermore, the coded stream includes APS (Adaptation Parameter Set) inwhich a parameter to be used in another one or more slices is stored inaddition to the above. An index number aps_idx is allocated to APS, andthe image coding apparatus 100 can insert, into the slice header, theindex number aps_idx for calling APS to be used.

The offset information is coded by the offset information coding unit154 (or the entropy coding unit 124), and inserted into any one of SPS,PPS, SH, slice data, BH, block data, and APS. In addition, the offsetinformation is obtained from any one of SPS, PPS, SH, slice data, BH,block data, and APS, and decoded by the offset information decoding unit252 (or the entropy decoding unit 224).

Examples of inserting the offset information into APS are shown in FIG.16A, FIG. 16B, and FIG. 16C. The image coding apparatus 100 is capableof collectively inserting the offset information of all of the blocks ina slice, and the image decoding apparatus 200 is capable of collectivelyobtaining the offset information from APS.

Examples of inserting the offset information into slice data are shownin FIG. 17A, FIG. 17B, and FIG. 17C. The image coding apparatus 100 iscapable of inserting the offset information on a block-by-block basis inslice data, and the image decoding apparatus 200 is capable of obtainingthe offset information on a block-by-block basis in slice data.

According to this embodiment, the offset information can be shared amonga plurality of target regions to be processed in the image codingapparatus 100 (the image decoding apparatus 200) as shown in FIG. 18.The solid lines in FIG. 18 show segment boundaries of target regions forthe offset processing, and the dotted lines show segment boundaries ofregions between which the offset information is shared. Here, the imagecoding apparatus 100 inserts, into a coded stream, not offsetinformation indicating an offset value and the like but informationindicating sharing of an offset value and the like, thereby suppressingincrease in a bit amount caused by offset processing.

For example, the image coding apparatus 100 may code a flag indicatingthat offset information is shared between all of the blocks in a slice,such as sao_one_lima_unit_flag, sao_one_cr_unit_flag, andsao_one_cb_unit_flag in FIG. 16A. In addition, the image codingapparatus 100 may code a flag indicating that offset information for asinge line is to be copied from a line immediately above, such assao_repeat_row_flag in FIG. 16A.

Furthermore, the image coding apparatus 100 may code a parameterindicating the number of target regions to be processed between whichthe offset information is shared, such as saoRun and sao_run_diff inFIG. 16B. In addition, the image coding apparatus 100 may codesao_merge_left_flag or sao_merge_up_flag which indicate that offsetinformation is to be copied from the region located on the left or theregion located above, as in FIG. 16B and FIG. 17B.

FIG. 19 is a flowchart indicating an operation of coding, among items ofthe offset information, an index number that indicates a pixelclassifying method, performed by the offset information coding unit 154.

First, the offset information coding unit 154 determines whether or notthe offset processing is performed (S1541). The offset informationcalculating unit 152 calculates offset information, such as divisionpattern, a pixel classifying method, a category index number, an offsetvalue, and so on. The offset information calculating unit 152 determinesthat offset processing is not to be performed when the bit amountrequired for the offset information is larger than an amount ofcorrection of coding deterioration. In this case, the offset processingunit 153 does not perform the offset processing.

Here, the offset information coding unit 154 obtains information onwhether or not the offset processing has been performed, from the offsetinformation calculating unit 152 or the offset processing unit 153. Whenthe offset processing has not been performed (No in S1541), the offsetinformation coding unit 154 codes the index number 0 that indicates thepixel classifying method (S1542).

When the offset processing is performed (Yes in S1541), the offsetinformation coding unit 154 determines whether or not the pixelclassifying method is the edge offset EO(0) (S1543). When the pixelclassifying method is the edge offset EO(0) (Yes in S1543), the offsetinformation coding unit 154 codes the index number 1 that indicates thepixel classifying method (S1544).

When the pixel classifying method is not the edge offset EO(0) (No inS1543), the offset information coding unit 154 determines whether or notthe pixel classifying method is the edge offset EO(1) (S1545). When thepixel classifying method is the edge offset EO(1) (Yes in S1545), theoffset information coding unit 154 codes the index number 2 thatindicates the pixel classifying method (S1546).

When the pixel classifying method is not the edge offset EO(1) (No inS1545), the offset information coding unit 154 determines whether or notthe pixel classifying method is the edge offset EO(2) (S1547). When thepixel classifying method is the edge offset EO(2) (Yes in S1547), theoffset information coding unit 154 codes the index number 3 thatindicates the pixel classifying method (S1548).

When the pixel classifying method is not the edge offset EO(2) (No inS1547), the offset information coding unit 154 determines whether or notthe pixel classifying method is the edge offset EO(3) (S1549). When thepixel classifying method is the edge offset EO(3) (Yes in S1549), theoffset information coding unit 154 codes the index number 4 thatindicates the pixel classifying method (S1550).

When the pixel classifying method is not the edge offset EO(3) (No inS1549), the offset information coding unit 154 codes the index number 5that indicates the pixel classifying method (S1551).

FIG. 20 is a flowchart indicating an operation performed by the offsetinformation decoding unit 252 to decode, among items of the offsetinformation, an index number that indicates the pixel classifyingmethod, and an operation performed by the offset processing unit 253 toperform offset processing.

First, the offset processing unit 253 determines whether or not theindex number decoded by the offset information decoding unit 252 is 0(S2521). When the index number is 0 (Yes in S2521), the offsetprocessing unit 253 does not perform the offset processing (S2522).

When the index number is not 0 (No in S2521), the offset processing unit253 determines whether or not the index number decoded by the offsetinformation decoding unit 252 is 1 (S2523). When the index number is 1(Yes in S2523), the offset processing unit 253 performs the edge offsetEO(0) (S2524).

When the index number is not 1 (No in S2523), the offset processing unit253 determines whether or not the index number decoded by the offsetinformation decoding unit 252 is 2 (S2525). When the index number is 2(Yes in S2525), the offset processing unit 253 performs the edge offsetEO(1) (S2526).

When the index number is not 2 (No in S2525), the offset processing unit253 determines whether or not the index number decoded by the offsetinformation decoding unit 252 is 3 (S2527). When the index number is 3(Yes in S2527), the offset processing unit 253 performs the edge offsetEO(2) (S2528).

When the index number is not 3 (No in S2527), the offset processing unit253 determines whether or not the index number decoded by the offsetinformation decoding unit 252 is 4 (S2529). When the index number is 4(Yes in S2529), the offset processing unit 253 performs the edge offsetEO(3) (S2530).

When the index number is not 4 (No in S2529), the offset processing unit253 performs the band offset BO(0) (S2531).

Through the processes described above, the image coding apparatus 100and the image decoding apparatus 200 add, to a reconstructed imagesignal, an offset value for making up the difference between an originalsignal and the reconstructed image signal. This makes it possible togenerate a reconstructed signal similar to an original signal.

Embodiment 2

According to Embodiment 1, it is possible to share offset informationamong a plurality of regions. However, in view of reducing theprocessing delay or lowering the memory amount, regions to be shared arelimited to adjacent ones. For example, the processing delay is reducedby limiting the regions to be shared to the adjacent regions on the leftand above. Furthermore, the memory amount for storing offset informationin a processed region is reduced by limiting the regions to be shared tothe adjacent region on the left.

On the other hand, the limitation of the regions to be shared makes itdifficult to share offset information in a large region. It is for thisreason that frequency of coding the offset information grows and the bitamount increases. Here, as shown in FIG. 16C or FIG. 17C, in the bandoffset, a band offset coding start category sao_band_position is codedas a parameter. Thus, the bit amount is larger than that of the edgeoffset. Accordingly, in terms of increase in the bit amount, it is moreadvantageous to use the edge offset.

In view of the above, the image coding apparatus according to thisembodiment reduces the bit amount required for when using the bandoffset, in order to correct disadvantages of the band offset compared tothe edge offset. It is to be noted that the band offset coding startcategory sao_band_position is an example of information that indicates ascope of application of the offset value.

The following describes an image coding apparatus according to thepresent embodiment and an image decoding apparatus corresponding to theimage coding apparatus.

FIG. 21 is a block diagram illustrating a configuration of a loopfiltering unit in the image coding apparatus according to thisembodiment. Other configuration of the image coding apparatus accordingto this embodiment is substantially equivalent to the configuration ofthe image coding apparatus 100 illustrated in FIG. 1. FIG. 22 is a blockdiagram illustrating a configuration of a loop filtering unit in theimage decoding apparatus according to this embodiment. Otherconfiguration of the image decoding apparatus according to thisembodiment is substantially equivalent to the configuration of the imagedecoding apparatus 200 illustrated in FIG. 2.

FIG. 23 is a flowchart illustrating operations performed by a loopfiltering unit 300 (a loop filtering unit of the image coding apparatus)illustrated in FIG. 21. FIG. 24 is a flowchart illustrating operationsperformed by a loop filtering unit 400 (a loop filtering unit of theimage decoding apparatus) illustrated in FIG. 22.

First, the configuration and the operation of the loop filtering unit300 (the loop filtering unit of the image coding apparatus) illustratedin FIG. 21 will be described. The loop filtering unit 300 includes: asignal obtaining unit 301; an offset information calculating unit 302;an offset processing unit 303; a signal outputting unit 304; an offsetinformation coding unit 305; and a control unit 306. Description foroverlapping portions with Embodiment 1 will be omitted, and for thedifferences; that is, the control unit 306 in FIG. 21, the offsetinformation coding unit 305 in FIG. 21, and Step S304 in FIG. 23 will bedescribed.

The control unit 306 controls the offset information coding unit 305 toreduce the bit amount of the offset information of the band offset, whenthe pixel classifying method is the band offset.

The offset information coding unit 305 performs coding to reduce thenumerical value of the index number indicating that the pixelclassifying method is the band offset.

In Step S304 of FIG. 23, the offset information coding unit 305allocates an index number to the pixel classifying method and codes theoffset information. At this time, the offset information coding unit 305allocates the index number such that the index number that indicates theband offset BO(0) is smaller than four edge offsets EO(0), EO(1), EO(2),and EO(3). Then, the offset information coding unit 305 inserts thecoded offset information into the coded stream.

Next, the configuration and the operation of the loop filtering unit 400(the loop filtering unit of the image decoding apparatus) illustrated inFIG. 22 will be described. The loop filtering unit 400 includes: asignal obtaining unit 401; an offset information decoding unit 402; anoffset processing unit 403; a signal outputting unit 404; and a controlunit 405. Description for overlapping portions with Embodiment 1 will beomitted, and for the differences; that is, the control unit 405 in FIG.22, the offset information decoding unit 402 in FIG. 22, and Step S402in FIG. 24 will be described.

The control unit 405 controls the offset information decoding unit 402such that the offset information of the band offset is decoded with asmall bit amount when the pixel classifying method is the band offset.

The offset information decoding unit 402 decodes the index number with asmall numerical value, as an index number indicating that the pixelclassifying method is the band offset.

In Step S402 of FIG. 24, the offset information decoding unit 402allocates an index number to the pixel classifying method and decodesthe offset information. At this time, the offset information decodingunit 402 allocates the index number such that the index number thatindicates the band offset BO(0) is smaller than the four edge offsetsEO(0), EO(1), EO(2), and EO(3).

Here, coding and decoding of the offset information performed by theoffset information coding unit 305 and the offset information decodingunit 402 will be described in more detail. For the pixel classifyingmethods in the offset processing, the edge offsets EO(0), EO(1), EO(2),and EO(3), and the band offset BO(0) are employed as with Embodiment 1.In this case, the difference between the smallest bit amount and thelargest bit amount which correspond to the index number indicating thepixel classifying method is three bits excepting the index number 0 forthe case when the offset processing is not performed.

In Embodiment 1, the largest bit amount is allocated to the band offsetas shown in FIG. 14. When the number of categories of the band offset is32, a difference of at most eight bits and at least five bits includingsao_band_position is generated between the band offset and the edgeoffset.

For that reason, according to this embodiment, a bit smaller than thatin the case of the edge offset is allocated to the index numberindicating the band offset as shown in FIG. 25. With this, thedifference of the bit amount between the band offset and the edge offsetis at most four bits and at least two bits, correcting disadvantages ofthe band offset compared to the edge offset.

It is to be noted that, as shown in FIG. 26, an offset processing ON/OFFflag (an offset processing flag) may be independent, as sao_on_flag,from the index number sao_type_idx that indicates the pixel classifyingmethod.

In FIG. 26, the band offset is allocated to the index number 0. Theindex numbers are each binarized such that a small value has a small bitlength and a large value has a large bit length, and the maximum bitlength is specified as four bits. However, the method of allocation isnot limited to the above. For example, the maximum bit length may not bespecified, and instead, all of the index numbers may be allocated withbits such that the last bit is 0. Subsequently, the description will begiven based on the bit allocation shown in FIG. 26.

Examples of inserting the offset information into APS are shown in FIG.27A and FIG. 27B. The offset processing ON/OFF flag sao_on_flag which isindependent from the index that indicates the pixel classifying methodis newly provided in the sao_unit_vlc shown in FIG. 27A. In addition,the smallest bit is allocated to the band offset in sao_type_idx ofsao_offset_vlc in FIG. 27B.

FIG. 27C is a diagram which shows an example of contexts of offsetinformation in APS. FIG. 27D is a flowchart which shows an example ofcoding the offset information in APS. FIG. 27E is a flowchart whichshows an example of decoding the offset information in APS.

In addition, Examples of inserting the offset information into slicedata are shown in FIG. 28A and FIG. 28B. The offset processing ON/OFFflag sao_on_flag is newly provided in sao_unit_cabac shown in FIG. 28A.In addition, the smallest bit is allocated to the band offset insao_type_idx of sao_offset_cabac shown in FIG. 28B.

FIG. 28C is a schematic view illustrating an example of contexts ofoffset information in slice data. FIG. 28D is a flowchart which shows anexample of coding the offset information in slice data. FIG. 28E is aflowchart which shows an example of decoding the offset information inslice data.

FIG. 29 is a flowchart indicating an operation of coding, among items ofoffset information, an index number that indicates a pixel classifyingmethod, performed by the offset information coding unit 305.

First, the offset information coding unit 305 determines whether or notoffset processing is performed (S3051). The offset informationcalculating unit 302 calculates offset information, such as the divisionpattern, the pixel classifying method, the category index number, theoffset value, and so on. The offset information calculating unit 302determines that offset processing is not to be performed when the bitamount required for the offset information is larger than an amount ofcorrection of coding deterioration. In this case, the offset processingunit 303 does not perform the offset processing.

Here, the offset information coding unit 305 obtains information onwhether or not the offset processing has been performed, from the offsetinformation calculating unit 302 or the offset processing unit 303. Whenthe offset processing has not been performed (No in S3051), the offsetinformation coding unit 305 codes the offset processing ON/OFF flag as 0(S3052).

When the offset processing has been performed (Yes in S3051), the offsetinformation coding unit 305 codes the offset processing ON/OFF flag as 1(S3053). Then, the offset information coding unit 305 determines whetheror not the pixel classifying method is the band offset BO(0) (S3054).

When the pixel classifying method is the band offset BO(0) (Yes inS3054), the offset information coding unit 305 codes the index number 0that indicates the pixel classifying method (S3055). When the pixelclassifying method is not the band offset BO(0) (NO in S3054), theoffset information coding unit 305 determines whether or not the pixelclassifying method is the edge offset EO(0) (S3056).

When the pixel classifying method is the edge offset EO(0) (Yes inS3056), the offset information coding unit 305 codes the index number 1that indicates the pixel classifying method (S3057). When the pixelclassifying method is not the edge offset EO(0) (NO in S3056), theoffset information coding unit 305 determines whether or not the pixelclassifying method is the edge offset EO(1) (S3058).

When the pixel classifying method is the edge offset EO(1) (Yes inS3058), the offset information coding unit 305 codes the index number 2that indicates the pixel classifying method (S3059). When the pixelclassifying method is not the edge offset EO(1) (NO in S3058), theoffset information coding unit 305 determines whether or not the pixelclassifying method is the edge offset EO(2) (S3060).

When the pixel classifying method is the edge offset EO(2) (Yes inS3060), the offset information coding unit 305 codes the index number 3that indicates the pixel classifying method (S3061). When the pixelclassifying method is not the edge offset EO(2) (No in S3060), theoffset information coding unit 305 codes the index number 4 thatindicates the pixel classifying method (S3062).

FIG. 30 is a flowchart indicating an operation performed by the offsetinformation decoding unit 402 to decode, among items of the offsetinformation, the index number that indicates the pixel classifyingmethod, and an operation performed by the offset processing unit 403 toperform offset processing.

First, the offset processing unit 403 determines whether or not theoffset processing ON/OFF flag decoded by the offset information decodingunit 402 is 0 (S4021). When the offset processing ON/OFF flag is 0 (Yesin S4021), the offset processing unit 403 does not perform the offsetprocessing (S4022).

When the offset processing ON/OFF flag is not 0 (No in S4021), theoffset information decoding unit 402 decodes the index number (S4023).Then, the offset processing unit 403 determines whether or not the indexnumber decoded by the offset information decoding unit 402 is 0 (S4024).

When the index number is 0 (Yes in S4024), the offset processing unit403 performs the band offset BO(0) (S4025). When the index number is not0 (No in S4024), the offset processing unit 403 determines whether ornot the index number decoded by the offset information decoding unit 402is 1 (S4026).

When the index number is 1 (Yes in S4026), the offset processing unit403 performs the edge offset EO(0)) (S4027). When the index number isnot 1 (No in S4026), the offset processing unit 403 determines whetheror not the index number decoded by the offset information decoding unit402 is 2 (S4028).

When the index number is 2 (Yes in S4028), the offset processing unit403 performs the edge offset EO(1) (S4029). When the index number is not2 (No in S4028), the offset processing unit 403 determines whether ornot the index number decoded by the offset information decoding unit 402is 3 (S4030).

When the index number is 3 (Yes in S4030), the offset processing unit403 performs the edge offset EO(2) (S4031). When the index number is not3 (No in S4030), the offset processing unit 403 performs the edge offsetEO(3) (S4032).

Through the processes described above, the image coding apparatus andthe image decoding apparatus reduce the difference in the bit amountrequired for coding the offset information between the band offset andthe edge offset. This allows the image coding apparatus and the imagedecoding apparatus to perform appropriate offset processing for each ofthe target regions to be processed. Therefore, the coding efficiency anda subjective image quality are improved.

It is to be noted that the image coding apparatus and the image decodingapparatus may allocate a small bit amount to an index number of the edgeoffset when the offset processing is performed to a luma signal. Also,the image coding apparatus and the image decoding apparatus may allocatea small bit amount to an index number of the band offset when the offsetprocessing is performed to a chroma signal. This facilitates use of thepixel classifying method that is more suitable to the feature of thesignal to be processed. Therefore, the coding efficiency and thesubjective image quality are further improved.

In addition, the image coding apparatus and the image decoding apparatusmay refer to a frequency transformation coefficient and allocate a smallbit amount to an index number of the edge offset in a region to beprocessed which has a small low-frequency component. Also, the imagecoding apparatus and the image decoding apparatus may allocate a smallbit amount to an index number of the band offset in a region to beprocessed which has a large low-frequency component. This facilitatesuse of the pixel classifying method that is more suitable to the featureof the signal to be processed. Therefore, the coding efficiency and thesubjective image quality are further improved.

In addition, for determining whether the amount of the above-describedlow-frequency components is great or small, a threshold may be used, orthe threshold may be coded.

Here, arithmetic coding will be described as a method for coding anddecoding offset information performed by the offset information codingunit 305 and the offset information decoding unit 402. In the arithmeticcoding, the image coding apparatus first transforms (binarizes) acurrent signal to be coded from a multivalued signal to a binary signal(bin, a signal of 0 or 1) and performs arithmetic coding on the binarysignal to generate a bitstream. One example of the arithmetic coding iscontext arithmetic coding (context adaptive arithmetic coding) in whicharithmetic coding is performed using an adaptive symbol occurrenceprobability.

In the context arithmetic coding, the image coding apparatus selects acontext for each of the signals to be coded, and determines a symboloccurrence probability according to the context. More specifically, inthe context arithmetic coding, the image coding apparatus first loads acontext and perform the arithmetic coding on a current signal to becoded based on a symbol occurrence probability for the context. Then,the image coding apparatus updates the symbol occurrence probabilitycorresponding to the context according to a value of the current signalthat is coded.

In coding of the offset processing ON/OFF flag sao_on_flag in a lumasignal, a chroma signal Cb, and a chroma signal Cr, a common context maybe used, or contexts may be changed for each of the signals as shown inFIG. 27C or FIG. 28C.

FIG. 28D is a flowchart which shows an example of using three contextswhen the offset information coding unit 305 codes, and inserts intoslice data, the offset processing ON/OFF flag sao_on_flag.

First, the offset information coding unit 305 determines whether or nota current signal to be processed is a luma signal (S3041). The offsetinformation coding unit 305 uses cIdx illustrated in FIG. 28A fordetermining of the luma signal. Here, when cIdx=0, the current signal isa luma signal.

When the current signal is a luma signal (Yes in S3041), the offsetinformation coding unit 305 selects and loads the context 1 (S3042).When the current signal is not a luma signal (No in S3041), the offsetinformation coding unit 305 determines whether or not the current signalis a chroma signal Cb (S3043). The offset information coding unit 305uses cIdx for determining of the chroma signal Cb in the same manner asthe determining of the luma signal (S3041). Here, when cIdx=1, thecurrent signal is a chroma signal Cb.

When the current signal is the chroma signal Cb (Yes in S3043), theoffset information coding unit 305 selects and loads the context 2(S3044). When the current signal is not the chroma signal Cb (No inS3043), the offset information coding unit 305 selects and loads thecontext 3 (S3045).

Then, the offset information coding unit 305 codes the offset processingON/OFF flag sao_on_flag using the context which is selected and loaded(S3046).

It is to be noted that the flowchart illustrated in FIG. 27D which showsan example of the case where the offset processing ON/OFF flagsao_on_flag is coded and inserted into APS is the same as thatillustrate in FIG. 28 described above, and thus the description will beomitted.

FIG. 28E is a flowchart which shows an example of using three contextswhen the offset information decoding unit 402 decodes the offsetprocessing ON/OFF flag sao_on_flag that is inserted in the slice data.

First, the offset information decoding unit 402 determines whether ornot a current signal to be processed is a luma signal (S4021). Theoffset information decoding unit 402 uses cIdx illustrated in FIG. 28Afor determining of the luma signal. Here, when cIdx=0, the currentsignal is a luma signal.

When the current signal is a luma signal (Yes in S4021), the offsetinformation decoding unit 402 selects and loads the context 1 (S4022).When the current signal is not a luma signal (No in S4021), the offsetinformation decoding unit 402 determines whether or not the currentsignal is a chroma signal Cb (S4023). The offset information decodingunit 402 uses cIdx for determining of the chroma signal Cb in the samemanner as the determining of the luma signal (S4021). Here, when cIdx=1,the current signal is a chroma signal Cb.

When the current signal is the chroma signal Cb (Yes in S4023), theoffset information decoding unit 402 selects and loads the context 2(S4024). When the current signal is not the chroma signal Cb (No inS4023), the offset information decoding unit 402 selects and loads thecontext 3 (S4025).

Then, the offset information decoding unit 402 decodes the offsetprocessing ON/OFF flag sao_on_flag using the context which is selectedand loaded (S4026).

It is to be noted that the flowchart illustrated in FIG. 27E which showsan example of the case where the offset processing ON/OFF flagsao_on_flag that is inserted into APS is decoded is the same as thatillustrate in FIG. 28E described above, and thus the description will beomitted.

Through the processes described above, the image coding apparatus andthe image decoding apparatus use a different context for each of theluma signal, the chroma signal Cb, and the chroma signal Cr, therebyallocating the symbol occurrence probability according to the feature ofeach of the signals. Thus, the image coding apparatus and the imagedecoding apparatus are capable of suppressing the code amount of theoffset processing ON/OFF flag sao_on_flag.

It is to be noted that the image coding apparatus and the image decodingapparatus may reduce the number of the contexts to be used for thecoding and the decoding to two (a luma signal and a chroma signal) bysharing a context between the chroma signals Cb and Cr.

Embodiment 3

The image coding apparatus and the image decoding apparatus according toEmbodiment 1 adds, to a reconstructed signal, an offset value calculatedfrom a difference value between an original signal and the reconstructedsignal, thereby enabling reducing of distortion of the reconstructedsignal from the original signal. In addition, the image coding apparatusand the image decoding apparatus share the offset information among aplurality of target regions to be processed, thereby suppressingincrease of a bit amount of the offset information in a coded stream.

In addition, according to Embodiment 2, the image coding apparatus codesinformation indicating whether or not to perform offset processing foreach of the regions to be processed, as the offset processing ON/OFFflag sao_on_flag, at a top of the offset information independently ofthe pixel classifying method sao_type_idx. When the offset processing isnot to be performed, the image coding apparatus does not perform codingon the sao_merge_left_flag or the sao_merge_up_flag which indicateswhether or not to copy offset information from a region on the left orabove, respectively.

With this, it is possible to suppress the bit amount. An image codingapparatus according to this embodiment, it is further possible toimprove throughput by integrating or simplifying arithmetic coding oneach item of the offset information.

Examples of the arithmetic coding include bypass arithmetic coding inaddition to the context arithmetic coding described in Embodiment 2. Thecontext arithmetic coding uses the adaptive symbol occurrenceprobability. On the other hand, in the bypass arithmetic coding, thearithmetic coding is performed using the symbol occurrence probabilitywhich is 50%. With this, the image coding apparatus does not have toload and update a context in the bypass arithmetic coding, and thus itis possible to speed up the processes.

In this embodiment, operations performed by an offset information codingunit and an offset information decoding unit according to thisembodiment are different from operations performed by the offsetinformation coding unit 154 and the offset information decoding unit 252according to Embodiment 1. In addition, operations performed by theoffset information coding unit and the offset information decoding unitaccording to this embodiment are different from the operations performedby the offset information coding unit 305 and the offset informationdecoding unit 402 according to Embodiment 2. The following describes thedifferences.

FIG. 31 illustrates a configuration of an offset information coding unit507 which codes offset information in the image coding apparatusaccording to this embodiment. The offset information coding unit 507includes: an arithmetic coding control unit 5071; a context arithmeticcoding unit 5072; and a bypass arithmetic coding unit 5073.

The arithmetic coding control unit 5071 switches between the contextarithmetic coding and the bypass arithmetic coding to be used accordingto the offset information. It is to be noted that the arithmetic codingcontrol unit 5071 may be included in the control unit 110 of the imagecoding apparatus 100 illustrated in FIG. 1. The context arithmeticcoding unit 5072 loads a context according to the offset information andperforms coding. The bypass arithmetic coding unit 5073 performs codingusing the symbol occurrence probability which is 50%.

FIG. 32 illustrates a configuration of an offset information decodingunit 606 which decodes the offset information in the image decodingapparatus according to this embodiment. The offset information decodingunit 606 includes: an arithmetic decoding control unit 6061; a contextarithmetic decoding unit 6062; and a bypass arithmetic decoding unit6063.

The arithmetic decoding control unit 6061 switches between the contextarithmetic decoding (context adaptive arithmetic decoding) and thebypass arithmetic decoding to be used according to the offsetinformation. It is to be noted that the arithmetic decoding control unit6061 may be included in the control unit 210 of the image decodingapparatus 200 illustrated in FIG. 2. The context arithmetic decodingunit 6062 loads a context according to the offset information andperforms decoding. The bypass arithmetic decoding unit 6063 performsdecoding using the symbol occurrence probability which is 50%.

FIG. 33 illustrates allocation of contexts (context indices) to theoffset information according to the first example of this embodiment,and a type of the arithmetic coding used in each syntax element of theoffset information.

The syntaxes for coding and decoding the offset information are the sameas the syntaxes in Embodiment 1 illustrated in FIG. 17A, FIG. 17B, andFIG. 17C.

Here, the initial bit of the pixel classifying method sao_type_idxserves as ON/OFF to determine whether or not to perform the offsetprocessing as illustrate in FIG. 14. There is strong tendency in thesymbol occurrence probability in the initial bit compared to the otheroffset information items. For that reason, the context arithmetic codingis used only for the initial bit of the pixel classifying methodsao_type_idx, and the bypass arithmetic coding is used for the otheroffset information items including the second and subsequent bits of thepixel classifying method sao_type_idx.

FIG. 34 is a flowchart illustrating an example of coding offsetinformation based on a combination of the types of the arithmetic codingillustrated in FIG. 33, which is performed by the offset informationcoding unit 507.

First, upon starting of the processing performed by the offsetinformation coding unit 507, the arithmetic coding control unit 5071sets the bypass arithmetic coding as the coding method (S5070).

Next, the arithmetic coding control unit 5071 determines whether or notthe target region is positioned at the left end of a slice or a tile(S5071). The offset information is copied only from a region in the sameslice and the tile. For that reason, the above-described determinationis performed prior to the coding of the left offset information copyflag sao_merge_left_flag.

In the case where the target region is not positioned at the left end(No in S5071), the bypass arithmetic coding unit 5073 codes the leftoffset information copy flag sao_merge_left_flag (S5072).

When the target region is positioned at the left end (Yes in S5071) orsubsequently to the coding of the sao_merge_left_flag (S5072), thearithmetic coding control unit 5071 determines whether or not thesao_merge_left_flag is 0 (S5073). Here, the sao_merge_left_flag being 0indicates that the offset information is not copied from the leftregion, and the sao_merge_left_flag being 1 indicates that the offsetinformation is copied from the left region.

It is to be noted that, when coding of the sao_merge_left_flag (S5072)is not performed, a value of the sao_merge_left_flag does not exist. Inthis case, the value of the sao_merge_left_flag is processed as 0. Inaddition, the offset information coding unit 507 may secure a memory forthe sao_merge_left_flag at the time of starting a process, and set aninitial value 0.

Next, when the sao_merge_left_flag indicates 0 (Yes is S5073), thearithmetic coding control unit 5071 determines whether or not the targetregion is positioned at the upper end of a slice or a tile (S5074).Since the offset information is copied only from a region in the sameslice and in the same tile as with the determination of the left end(S5071), the above-described determination is performed prior to thecoding of the upper offset information copy flag sao_merge_up_flag.

In the case where the target region is not at the upper end (No inS5074), the bypass arithmetic coding unit 5073 codes the upper offsetinformation copy flag sao_merge_up_flag (S5075).

When the target region is positioned at the upper end (Yes in S5074) orsubsequently to the coding of the sao_merge_up_flag (S5075), thearithmetic coding control unit 5071 determines whether or not thesao_merge_up_flag is 0 (S5076). Here, the sao_merge_up_flag being 0indicates that the offset information is not copied from the upperregion, and the sao_merge_up_flag being 1 indicates that the offsetinformation is copied from the upper region.

It is to be noted that, when coding of the sao_merge_up_flag (S5075) isnot performed, a value of the sao_merge_up_flag does not exist. In thiscase, the value of the sao_merge_up_flag is processed as 0. In addition,the offset information coding unit 507 may secure a memory for thesao_merge_up_flag at the time of starting a process, and set an initialvalue 0.

Next, when the sao_merge_up_flag indicates 0 (Yes is S5076), thearithmetic coding control unit 5071 switches the coding method to thecontext arithmetic coding (S5077).

Next, the arithmetic coding control unit 5072 loads a context forbinIdx0 of the pixel classifying method sao_type_idx. Then, the contextarithmetic coding control unit 5072 codes the binIdx0 of the pixelclassifying method sao_type_idx (S5078).

Next, the arithmetic coding control unit 5071 determines whether or notthe binIdx0 of sao_type_idx indicates 1 (S5079). Here, it indicates thatthe offset processing is not to be performed on the target region to beprocessed when the binIdx0 indicates 0, and it indicates that the offsetprocessing is to be performed when the binIdx0 indicates 1.

When binIdx0 indicates 1 (Yes is S5079), the arithmetic coding controlunit 5071 switches the coding method to the bypass arithmetic coding(S5080).

Next, the bypass arithmetic coding unit 5073 codes the remaining pixelclassifying method sao_type_idx other than the binIdx0 and the offsetabsolute value sao_offset (S5081). Here, according to this embodiment,the number of offset absolute values sao_offset is four in any of thepixel classifying methods. However, the bypass arithmetic coding unit5073 may code the offset absolute values which are different in numberfor each of the pixel classifying methods.

Next, the arithmetic coding control unit 5071 determines whether or notthe pixel classifying method is the band offset (S5082). Here, thearithmetic coding control unit 5071 uses the pixel classifying methodsao_type_idx for the determination.

In this example, the band offset is allocated with 5 as a value ofsao_type_idx. For that reason, the arithmetic coding control unit 5071determines that the pixel classifying method is the band offset whensao_type_idx is 5, and that the pixel classifying method is not the bandoffset when sao_type_idx is not 5.

When the pixel classifying method is the band offset (Yes in S5082), thebypass arithmetic coding unit 5073 codes the offset value±signsao_offset_sign and the band offset coding start categorysao_band_position (S5083).

It is to be noted that, in this embodiment, the bypass arithmetic codingunit 5073 codes the offset value±sign sao_offset_sign only in the caseof the band offset. However, the bypass arithmetic coding unit 5073 maycode the offset value±sign sao_offset_sign in the case of the edgeoffset as well. In this case, the offset value±sign sao_offset_sign iscoded in Step S5081.

Further in this case, in Step S5081, the offset absolute valuesao_offset and the offset value±sign sao_offset_sign may be integratedand coded as an offset value.

FIG. 35 is a flowchart which shows an example of decoding the offsetinformation based on a combination of the types of the arithmeticdecoding illustrated in FIG. 33, which is performed by the offsetinformation decoding unit 606.

First, upon starting of the processing performed by the offsetinformation decoding unit 606, the arithmetic decoding control unit 6061sets the bypass arithmetic decoding as a decoding method (S6060).

Next, the arithmetic decoding control unit 6061 determines whether ornot the target region is positioned at the left end of a slice or a tile(S6061). The offset information is copied only from a region in the sameslice and the same tile. For that reason, the above-describeddetermination is performed prior to the decoding of the left offsetinformation copy flag sao_merge_left_flag.

When the target region is not positioned at the left end (No in S6061),the bypass arithmetic decoding unit 6063 decodes the left offsetinformation copy flag sao_merge_left_flag (S6062).

When the target region is positioned at the left end (Yes in S6061) orsubsequently to the decoding of the sao_merge_left_flag (S6062), thearithmetic decoding control unit 6061 determines whether or not thesao_merge_left_flag is 0 (S6063). Here, the sao_merge_left_flag being 0indicates that the offset information is not copied from the leftregion, and the sao_merge_left_flag being 1 indicates that the offsetinformation is copied from the left region.

It is to be noted that, when the decoding of the sao_merge_left_flag(S6062) is not performed, a value of the sao_merge_left_flag does notexist. In this case, the value of the sao_merge_left_flag is processedas 0. In addition, the offset information decoding unit 606 may secure amemory for sao_merge_left_flag at the time of starting a process, andset an initial value 0.

Next, when sao_merge_left_flag indicates 0 (Yes is S6063), thearithmetic decoding control unit 6061 determines whether or not thetarget region is positioned at the upper end of a slice or a tile(S6064). Since the offset information is copied only from a region inthe same slice and in the same tile as with the determination of theleft end (S6061), the above-described determination is performed priorto decoding of the upper offset information copy flag sao_merge_up_flag.

When the target region is not positioned at the upper end (No in S6064),the bypass arithmetic decoding unit 6063 decodes the upper offsetinformation copy flag sao_merge_left_flag (S6065).

When the target region is positioned at the upper end (Yes in S6064) orsubsequently to decoding of the sao_merge_up_flag (S6065), thearithmetic decoding control unit 6061 determines whether or not thesao_merge_up_flag is 0 (S6066). Here, the sao_merge_up_flag being 0indicates that the offset information is not copied from the upperregion, and the sao_merge_up_flag being 1 indicates that the offsetinformation is copied from the upper region.

It is to be noted that, when decoding of the sao_merge_up_flag (S6065)is not performed, a value of the sao_merge_up_flag does not exist. Inthis case, the value of the sao_merge_up_flag is processed as 0. Inaddition, the offset information decoding unit 606 may secure a memoryfor sao_merge_up_flag at the time of starting a process, and set aninitial value 0.

Next, when sao_merge_up_flag indicates 0 (Yes is S6066), the arithmeticdecoding control unit 6061 switches the decoding method to the contextarithmetic decoding (S6067).

Next, the context arithmetic decoding unit 6062 loads a context forbinIdx of the pixel classifying method sao_type_idx. Then, the contextarithmetic decoding control unit 6062 decodes binIdx0 of the pixelclassifying method sao_type_idx (S6068).

Next, the arithmetic decoding control unit 6061 determines whether ornot binIdx0 of sao_type_idx indicates 1 (S6069). Here, it indicates thatthe offset processing is not to be performed on the target region to beprocessed when binIdx0 indicates 0, and it indicates that the offsetprocessing is to be performed when binIdx0 indicates 1.

When binIdx0 indicates 1 (Yes is S6069), the arithmetic decoding controlunit 6061 switches the decoding method to the bypass arithmetic decoding(S6070).

Next, the bypass arithmetic decoding unit 6063 decodes the remainingpixel classifying method sao_type_idx other than binIdx0 and the offsetabsolute value sao_offset (S6071). Here, in this embodiment, the numberof offset absolute values sao_offset is four in any of the pixelclassifying methods. However, the bypass arithmetic decoding unit 6063may decode offset absolute values which are different in number for eachof the pixel classifying methods.

Then, the arithmetic decoding control unit 6061 determines whether ornot the pixel classifying method is the band offset (S6072). Here, thearithmetic decoding control unit 6061 uses the pixel classifying methodsao_type_idx for the determination.

In this example, the band offset is allocated with 5 as a value ofsao_type_idx. For that reason, the arithmetic decoding control unit 6061determines that the pixel classifying method is the band offset whensao_type_idx is 5, and that the pixel classifying method is not the bandoffset when sao_type_idx is not 5.

When the pixel classifying method is the band offset (Yes in S6072), thebypass arithmetic decoding unit 6063 decodes the offset value±signsao_offset_sign and the band offset coding start categorysao_band_position (S6073).

It is to be noted that, in this embodiment, the bypass arithmeticdecoding unit 6063 decodes the offset value±sign sao_offset_sign only inthe case the band offset. However, the bypass arithmetic decoding unit6063 may decode the offset value±sign sao_offset_sign in the case of theedge offset as well. In this case, the offset value±sign sao_offset_signis decoded in Step S6071.

Further in this case, in Step S6071, the offset absolute valuesao_offset and the offset value±sign sao_offset_sign may be integratedand decoded as an offset value.

As described above, the bypass arithmetic coding and the bypassarithmetic decoding are used in coding and decoding of all the offsetinformation other than binIdx0 of the pixel classifying methodsao_type_idx. This eliminates the need for the image coding apparatusand the image decoding apparatus to load and update contexts everywhere.Therefore, the throughput is improved.

FIG. 36A illustrates allocation of contexts (context indices) to theoffset information according to the second example of this embodiment,and a type of the arithmetic coding used in each syntax element of theoffset information.

In this example, the initial bit of the pixel classifying methodsao_type_idx is coded (decoded) as the offset processing ON/OFF flagsao_on_flag, at a top of the offset information independently of thepixel classifying method sao_type_idx. The syntaxes for coding anddecoding the offset information are the same as the syntaxes inEmbodiment 2 illustrated in FIG. 28A and FIG. 28B.

Here, there is strong tendency in the symbol occurrence probability inthe offset processing ON/OFF flag sao_on_flag compared to other offsetinformation. For that reason, the context arithmetic coding is used onlyfor the offset processing ON/OFF flag sao_on_flag. The bypass arithmeticcoding is used for the left offset information copy flagsao_merge_left_flag that is coded (decoded) after the offset processingON/OFF flag sao_on_flag, and for the subsequent offset information.

The throughput is further improved by using the bypass arithmetic codingfor the left offset information copy flag sao_merge_left_flag and forthe subsequent offset information.

Here, allocation of bits to the offset processing ON/OFF flagsao_on_flag and the pixel classifying method sao_type_idx is equivalentto the allocation according to Embodiment 2 illustrated in FIG. 26.However, the method of bit allocation is not limited to the above. As tothe allocation of a bit to the pixel classifying method sao_type_idx,the edge offset (0) may be allocated with the smallest bit amount andthe band offset may e allocated with the largest bit amount asillustrated in FIG. 36B.

In the example shown in FIG. 28B, the offset value±sign sao_offset_signand the band offset coding start category sao_band_position areconsecutively coded (decoded) in order to suppress the number ofconditional branches corresponding to if statements. However, the orderof coding (decoding) is not limited to the example shown in FIG. 28B.

FIG. 36C is a table which shows an objective performance of the imagecoding apparatus and the image decoding apparatus according to theexample shown in FIG. 36C. FIG. 36C shows that there is littledeterioration in the objective performance, based on the index in NPL 2.The details of the objective performance corresponding to the example ofFIG. 36A will be described later.

FIG. 37 is a flowchart illustrating an example of coding of offsetinformation based on a combination of the types of the arithmetic codingillustrated in FIG. 36A, which is performed by the offset informationcoding unit 507.

First, upon starting of processing by the offset information coding unit507, the arithmetic coding control unit 5071 sets the context arithmeticcoding as the coding method (S5170).

Then, the context arithmetic coding unit 5072 loads a context for theoffset processing ON/OFF flag sao_on_flag, and codes the offsetprocessing ON/OFF flag sao_on_flag using the context (S5171).

Next, the arithmetic coding control unit 5071 determines whether or notthe offset processing ON/OFF flag sao_on_flag indicates 1 (S5172). Here,it indicates that the offset processing is not to be performed on thetarget region to be processed when the sao_on_flag indicates 0, and itindicates that the offset processing is to be performed on the targetregion when the sao_on_flag indicates 1.

When the offset processing ON/OFF flag sao_on_flag indicates 1 (Yes isS5172), the arithmetic coding control unit 5071 switches the codingmethod to the bypass arithmetic coding (S5173). With this, the bypassarithmetic coding is used throughout the subsequent coding steps.

Next, the arithmetic coding control unit 5071 determines whether or notthe target region is positioned at the left end of a slice or a tile(S5174). The offset information is copied only from a region in the sameslice and the same tile. For that reason, the above-describeddetermination is performed prior to the coding of the left offsetinformation copy flag sao_merge_left_flag.

In the case where the target region is not at the left end (No inS5174), the bypass arithmetic coding unit 5073 codes the left offsetinformation copy flag sao_merge_left_flag (S5175).

When the target region is positioned at the left end (Yes in S5174) orsubsequently to coding of the sao_merge_left_flag (S5175), thearithmetic coding control unit 5071 determines whether or not thesao_merge_left_flag is 0 (S5176). Here, the sao_merge_left_flag being 0indicates that the offset information is not copied from the leftregion, and the sao_merge_left_flag being 1 indicates that the offsetinformation is copied from the left region.

It is to be noted that, when the coding of the sao_merge_left_flag(S5175) is not performed, a value of the sao_merge_left_flag does notexist. In this case, the value of the sao_merge_left_flag is processedas 0. In addition, the offset information coding unit 507 may secure amemory for the sao_merge_left_flag at the time of starting a process,and set an initial value 0.

Next, when the sao_merge_left_flag indicates 0 (Yes is S5176), thearithmetic coding control unit 5071 determines whether or not the targetregion is positioned at the upper end of a slice or a tile (S5177).Since the offset information is copied only from a region in the sameslice and in the same tile as with the determination of the left end(S5174), the above-described determination is performed prior to thecoding of the upper offset information copy flag sao_merge_up_flag.

In the case where the target region is not at the upper end (No inS5177), the bypass arithmetic coding unit 5073 codes the upper offsetinformation copy flag sao_merge_up_flag (S5178).

When the target region is positioned at the upper end (Yes in S5177) orsubsequently to the coding of the sao_merge_up_flag (S5178), thearithmetic coding control unit 5071 determines whether or not thesao_merge_up_flag is 0 (S5179). Here, the sao_merge_up_flag being 0indicates that the offset information is not copied from the upperregion, and the sao_merge_up_flag being 1 indicates that the offsetinformation is copied from the upper region.

It is to be noted that, when coding of the sao_merge_up_flag (S5178) isnot performed, a value of the sao_merge_up_flag does not exist. In thiscase, the value of the sao_merge_up_flag is processed as 0. In addition,the offset information coding unit 507 may secure a memory for thesao_merge_up_flag at the time of starting a process, and set an initialvalue 0.

Next, when sao_merge_up_flag indicates 0 (Yes in S5179), the bypassarithmetic coding unit 5073 codes the pixel classifying methodsao_type_idx and the offset absolute value sao_offset (S5180). Here, inthis embodiment, the number of offset absolute values sao_offset is fourin any of the pixel classifying methods. However, the bypass arithmeticcoding unit 5073 may code offset absolute values which are different innumber for each of the pixel classifying methods.

Next, the arithmetic coding control unit 5071 determines whether or notthe pixel classifying method is the band offset (S5181). Here, thearithmetic coding control unit 5071 uses the pixel classifying methodsao_type_idx for the determination.

In this example, the band offset is allocated with 0 as a value ofsao_type_idx. For that reason, the arithmetic coding control unit 5071determines that the pixel classifying method is the band offset whensao_type_idx is 0, and that the pixel classifying method is not the bandoffset when sao_type_idx is not 0.

When the pixel classifying method is the band offset (Yes in S5181), thebypass arithmetic coding unit 5073 codes the offset value±signsao_offset_sign and the band offset coding start categorysao_band_position (S5182).

It is to be noted that, in this embodiment, the bypass arithmetic codingunit 5073 codes the offset value±sign sao_offset_sign only in the caseof the band offset. However, the bypass arithmetic coding unit 5073 maycode the offset value±sign sao_offset_sign in the case of the edgeoffset as well. In this case, the offset value±sign sao_offset_sign iscoded in Step S5180.

Further in this case, in Step S5180, the offset absolute valuesao_offset and the offset value±sign sao_offset_sign may be integratedand coded as an offset value.

FIG. 38 is a flowchart which shows an example of the decoding of theoffset information based on a combination of the types of the arithmeticdecoding illustrated in FIG. 36A, which is performed by the offsetinformation decoding unit 606.

First, upon starting of the processing performed by the offsetinformation decoding unit 606, the arithmetic decoding control unit 6061sets the context arithmetic decoding as a decoding method (S6160).

Then, the context arithmetic decoding unit 6062 loads a context for theoffset processing ON/OFF flag sao_on_flag, and decodes the offsetprocessing ON/OFF flag sao_on_flag using the context (S6161).

Next, the arithmetic decoding control unit 6061 determines whether ornot the offset processing ON/OFF flag sao_on_flag indicates 1 (S6162).Here, when the sao_on_flag is 0, it indicates that the offset processingis not to be performed on the target region to be processed, and whenthe sao_on_flag is 1, it indicates that the offset processing is to beperformed on the target region.

Next, when the offset processing ON/OFF flag sao_on_flag indicates 1(Yes is S6162), the arithmetic decoding control unit 6061 switches thedecoding method to the bypass arithmetic decoding (S6163). With this,the bypass arithmetic decoding is used throughout the subsequentdecoding steps.

Next, the arithmetic decoding control unit 6061 determines whether ornot the target region is positioned at the left end of a slice or a tile(S6164). The offset information is copied only from a region in the sameslice and the same tile. For that reason, the above-describeddetermination is performed prior to the decoding of the left offsetinformation copy flag sao_merge_left_flag.

When the target region is not positioned at the left end (No in S6164),the bypass arithmetic decoding unit 6063 decodes the left offsetinformation copy flag sao_merge_left_flag (S6165).

When the target region is positioned at the left end (Yes in S6164) orsubsequently to the decoding of the sao_merge_left_flag (S6165), thearithmetic decoding control unit 6061 determines whether or not thesao_merge_left_flag is 0 (S6166). Here, the sao_merge_left_flag being 0indicates that the offset information is not copied from the leftregion, and the sao_merge_left_flag being 1 indicates that the offsetinformation is copied from the left region.

It is to be noted that, when the decoding of the sao_merge_left_flag(S6165) is not performed, a value of the sao_merge_left_flag does notexist. In this case, the value of the sao_merge_left_flag is processedas 0. In addition, the offset information decoding unit 606 may secure amemory for sao_merge_left_flag at the time of starting a process, andset an initial value 0.

Next, when sao_merge_left_flag indicates 0 (Yes is S6166), thearithmetic decoding control unit 6061 determines whether or not thetarget region is positioned at the upper end of a slice or a tile(S6167). Since the offset information is copied only from a region inthe same slice and in the same tile as with the determination of theleft end (S6164), the above-described determination is performed priorto the decoding of the upper offset information copy flagsao_merge_up_flag.

When the target region is not positioned at the upper end (No in S6167),the bypass arithmetic decoding unit 6063 decodes the upper offsetinformation copy flag sao_merge_left_flag (S6168).

When the target region is positioned at the upper end (Yes in S6167 orsubsequently to the decoding of the sao_merge_up_flag (S6168), thearithmetic decoding control unit 6061 determines whether or not thesao_merge_up_flag is 0 (S6169). Here, the sao_merge_up_flag being 0indicates that the offset information is not copied from the upperregion, and the sao_merge_up_flag being 1 indicates that the offsetinformation is copied from the upper region.

It is to be noted that, when the decoding of the sao_merge_up_flag(S6168) is not performed, a value of the sao_merge_up_flag does notexist. In this case, the value of the sao_merge_up_flag is processed as0. In addition, the offset information decoding unit 606 may secure amemory for sao_merge_up_flag at the time of starting a process, and setan initial value 0.

Next, when sao_merge_up_flag indicates 0 (Yes in S6169), the bypassarithmetic decoding unit 6063 decodes the pixel classifying methodsao_type_idx and the offset absolute value sao_offset (S6170). Here, inthis embodiment, the number of offset absolute values sao_offset is fourin any of the pixel classifying methods. However, the bypass arithmeticdecoding unit 6063 may decode the offset absolute values which aredifferent in number for each of the pixel classifying methods.

Then, the arithmetic decoding control unit 6061 determines whether ornot the pixel classifying method is the band offset (S6171). Here, thearithmetic decoding control unit 6061 uses the pixel classifying methodthe sao_type_idx for the determination.

In this example, the band offset is allocated with 0 as a value of thesao_type_idx. For that reason, the arithmetic decoding control unit 6061determines that the pixel classifying method is the band offset when thesao_type_idx is 0, and that the pixel classifying method is not the bandoffset when the sao_type_idx is not 0.

When the pixel classifying method is the band offset (Yes in S6171), thebypass arithmetic decoding unit 6063 decodes the offset value±signsao_offset_sign and the band offset coding start categorysao_band_position (S6172).

It is to be noted that, according to this embodiment, the bypassarithmetic decoding unit 6063 decodes the offset value±signsao_offset_sign only in the case of the band offset. However, the bypassarithmetic decoding unit 6063 may decode the offset value±signsao_offset_sign in the case of the edge offset as well. In this case,the offset value±sign sao_offset_sign is decoded in Step S6170.

Further in this case, in Step S6170, the offset absolute valuesao_offset and the offset value±sign sao_offset_sign may be integratedand decoded as an offset value.

As described above, the bypass arithmetic coding and the bypassarithmetic decoding are used in the coding and the decoding of all ofthe offset information items other than the offset processing ON/OFFflag sao_on_flag that is positioned at the top. This eliminates the needfor the image coding apparatus and the image decoding apparatus to loadand update contexts everywhere. Therefore, the throughput is improved.

FIG. 36C illustrates a result based on test conditions specified in theHEVC standard (see NPL 2), as an objective performance according to theexample of FIG. 36A.

In FIG. 36C, Configuration indicates coding parameter settingconditions. BD-rate indicates an objective index calculated from a peaksignal-to-noise ratio (PSNR) of a reconstructed image and a code amountof a coded stream. A negative BD-rate indicates improvement in theobjective performance, and a positive BD-rate indicates deterioration inthe objective performance. It is to be noted that BD-rate in FIG. 36Cindicates improvement or deterioration in the objective performanceaccording to the example of FIG. 36A based on comparison with Embodiment1.

As illustrated in FIG. 36C, the BD-rate falls within a range of ±0.1.This indicates that the objective performance according to the exampleof FIG. 36A is substantially equivalent to the objective performance ofEmbodiment 1. This means that there is little deterioration in theobjective performance and that the throughput has been improved in theexample of FIG. 36A.

FIG. 39A illustrates allocation of contexts (context indices) to theoffset information items according to the third example of thisembodiment, and a type of the arithmetic coding used in each syntaxelement of the offset information items.

In this example, in comparison with FIG. 36A, the context arithmeticcoding is used for the left offset information copy flagsao_merge_left_flag and the upper offset information copy flagsao_merge_up_flag. The syntaxes for the coding and the decoding of theoffset information are the same as the syntaxes in Embodiment 2illustrated in FIG. 28A and FIG. 28B.

There is strong tendency in the symbol occurrence probability insao_on_flag, sao_merge_left_flag, and sao_merge_up_flag, compared to theother offset information items. For that reason, the context arithmeticcoding is used only for the above-described three flags, and the bypassarithmetic coding is used for the pixel classifying method sao_type_idxand the subsequent offset information items. With this, the image codingapparatus can code the offset information while maintaining the codingefficiency and the throughput in a balanced manner.

The offset processing ON/OFF flag sao_on_flag and the pixel classifyingmethod sao_type_idx may be allocated with bits as shown in FIG. 26 or inFIG. 36B.

In the example shown in FIG. 28B, the offset value±sign sao_offset_signand the band offset coding start category sao_band_position areconsecutively coded (decoded) in order to suppress the number ofconditional branches corresponding to if statements. However, the orderof coding (decoding) is not limited to the example shown in FIG. 28B.

In addition, in the example of FIG. 39A, the context is used for theoffset processing ON/OFF flag sao_on_flag, the left offset informationcopy flag sao_merge_left_flag, and the upper offset information copyflag sao_merge_up_flag. The context used for these flags may be sharedbetween the luma signal, the chroma signal Cb and the chroma signal Cr.With this, it is possible to reduce the number of contexts and thememory size.

In addition, the image coding apparatus may use a different context foreach of the luma signal, the chroma signal Cb and the chroma signal Cr,or may share the same context between the chroma signals Cb and Cr. Withthis, the image coding apparatus can further improve the codingefficiency compared to the case where the same context is used for allof the signals.

FIG. 39B is a table which shows an objective performance of the imagecoding apparatus and the image decoding apparatus according to theexample shown in FIG. 39A. FIG. 39B shows that there is littledeterioration in the objective performance, based on the index in NPL 2.The details of the objective performance corresponding to the example ofFIG. 39A will be described later.

FIG. 40 is a flowchart illustrating an example of coding of the offsetinformation based on a combination of the types of the arithmetic codingillustrated in FIG. 39A, which is performed by the offset informationcoding unit 507.

First, upon starting of processing by the offset information coding unit507, the arithmetic coding control unit 5071 sets the context arithmeticcoding as the coding method (S5270).

Then, the context arithmetic coding unit 5072 loads a context for theoffset processing ON/OFF flag sao_on_flag, and codes the offsetprocessing ON/OFF flag sao_on_flag using the context (S5271).

Next, the arithmetic coding control unit 5071 determines whether or notthe offset processing ON/OFF flag sao_on_flag indicates 1 (S5272). Here,it indicates that the offset processing is not to be performed on thetarget region to be processed when the sao_on_flag indicates 0, and itindicates that the offset processing is to be performed on the targetregion when the sao_on_flag indicates 1.

When the offset processing ON/OFF flag sao_on_flag indicates 1 (Yes isS5272), the arithmetic coding control unit 5071 determines whether ornot the target region is positioned at the left end of a slice or a tile(S5273). The offset information is copied only from a region in the sameslice and the same tile. For that reason, the above-describeddetermination is performed prior to coding of the left offsetinformation copy flag sao_merge_left_flag.

When the target region is not positioned at the left end (No in S5273),the context arithmetic coding unit 5072 loads a context for the leftoffset information copy flag sao_merge_left_flag. Then, the contextarithmetic coding unit 5072 codes the left offset information copy flagsao_merge_left_flag (S5274).

When the target region is positioned at the left end (Yes in S5273) orsubsequently to the coding of the sao_merge_left_flag (S5274), thearithmetic coding control unit 5071 determines whether or not thesao_merge_left_flag is 0 (S5275). Here, the sao_merge_left_flag being 0indicates that the offset information is not copied from the leftregion, and the sao_merge_left_flag being 1 indicates that the offsetinformation is copied from the left region.

It is to be noted that, when the coding of the sao_merge_left_flag(S5274) is not performed, a value of the sao_merge_left_flag does notexist. In this case, the value of the sao_merge_left_flag is processedas 0. In addition, the offset information coding unit 507 may secure amemory for the sao_merge_left_flag at the time of starting a process,and set an initial value 0.

Next, when the sao_merge_left_flag indicates 0 (Yes is S5275), thearithmetic coding control unit 5071 determines whether or not the targetregion is positioned at the upper end of a slice or a tile (S5276).Since the offset information is copied only from a region in the sameslice and in the same tile as with the determination of the left end(S5273), the above-described determination is performed prior to thecoding of the upper offset information copy flag sao_merge_up_flag.

When the target region is not positioned at the upper end (No in S5276),the context arithmetic coding unit 5072 loads a context for the upperoffset information copy flag sao_merge_up_flag. Then, the contextarithmetic coding unit 5072 codes the upper offset information copy flagsao_merge_up_flag (S5277).

When the target region is positioned at the upper end (Yes in S5276) orsubsequently to the coding of the sao_merge_up_flag (S5277), thearithmetic coding control unit 5071 determines whether or not thesao_merge_up_flag is 0 (S5278). Here, the sao_merge_up_flag being 0indicates that the offset information is not copied from the upperregion, and the sao_merge_up_flag being 1 indicates that the offsetinformation is copied from the upper region.

It is to be noted that, when the coding of the sao_merge_up_flag (S5277)is not performed, a value of the sao_merge_up_flag does not exist. Inthis case, the value of the sao_merge_up_flag is processed as 0. Inaddition, the offset information coding unit 507 may secure a memory forthe sao_merge_up_flag at the time of starting a process, and set aninitial value 0.

Next, when the sao_merge_up_flag indicates 0 (Yes is S5278), thearithmetic coding control unit 5071 switches the coding method to thebypass arithmetic coding (S5279). With this, the bypass arithmeticcoding is used throughout the subsequent coding steps.

Next, the bypass arithmetic coding unit 5073 codes the pixel classifyingmethod sao_type_idx and the offset absolute value sao_offset (S5280).Here, in this embodiment, the number of offset absolute valuessao_offset is four in any of the pixel classifying methods. However, thebypass arithmetic coding unit 5073 may code offset absolute values whichare different in number for each of the pixel classifying methods.

Next, the arithmetic coding control unit 5071 determines whether or notthe pixel classifying method is the band offset (S5281). Here, thearithmetic coding control unit 5071 uses the pixel classifying methodsao_type_idx for the determination.

In this example, the band offset is allocated with 0 as a value ofsao_type_idx. For that reason, the arithmetic coding control unit 5071determines that the pixel classifying method is the band offset whensao_type_idx is 0, and that the pixel classifying method is not the bandoffset when sao_type_idx is not 0.

When the pixel classifying method is the band offset (Yes in S5281), thebypass arithmetic coding unit 5073 codes the offset value±signsao_offset_sign and the band offset coding start categorysao_band_position (S5282).

It is to be noted that, in this embodiment, the bypass arithmetic codingunit 5073 codes the offset value±sign sao_offset_sign only in the caseof the band offset. However, the bypass arithmetic coding unit 5073 maycode the offset value±sign sao_offset_sign in the case of the edgeoffset as well. In this case, the offset value±sign sao_offset_sign iscoded in Step S5280.

Further in this case, in Step S5280, the offset absolute valuesao_offset and the offset value±sign sao_offset_sign may be integratedand coded as an offset value.

FIG. 41 is a flowchart which shows an example of decoding the offsetinformation based on a combination of the types of the arithmeticdecoding illustrated in FIG. 39A, which is performed by the offsetinformation decoding unit 606.

First, upon starting of the processing by the offset informationdecoding unit 606, the arithmetic decoding control unit 6061 sets thecontext arithmetic decoding as a decoding method (S6260).

Then, the context arithmetic decoding unit 6062 loads a context for theoffset processing ON/OFF flag sao_on_flag, and decodes the offsetprocessing ON/OFF flag sao_on_flag using the context (S6261).

Next, the arithmetic decoding control unit 6061 determines whether ornot the offset processing ON/OFF flag sao_on_flag indicates 1 (S6262).Here, it indicates that the offset processing is not to be performed onthe target region to be processed when the sao_on_flag indicates 0, andit indicates that the offset processing is to be performed on the targetregion when the sao_on_flag indicates 1.

Next, when sao_on_flag indicates 1 (Yes is S6262), the arithmeticdecoding control unit 6061 determines whether or not the target regionis positioned at the left end of a slice or a tile (S6263). The offsetinformation is copied only from a region in the same slice and the sametile. For that reason, the above-described determination is performedprior to the decoding of the left offset information copy flagsao_merge_left_flag.

When the target region is not positioned at the left end (No in S6263),the context arithmetic decoding unit 6062 loads a context for the leftoffset information copy flag sao_merge_left_flag. Then, the contextarithmetic decoding unit 6062 decodes the left offset information copyflag sao_merge_left_flag (S6264).

When the target region is positioned at the left end (Yes in S6263) orsubsequently to decoding of the sao_merge_left_flag (S6264), thearithmetic decoding control unit 6061 determines whether or not thesao_merge_left_flag is 0 (S6265). Here, the sao_merge_left_flag being 0indicates that the offset information is not copied from the leftregion, and the sao_merge_left_flag being 1 indicates that the offsetinformation is copied from the left region.

It is to be noted that, when decoding of the sao_merge_left_flag (S6264)is not performed, a value of the sao_merge_left_flag does not exist. Inthis case, the value of the sao_merge_left_flag is processed as 0. Inaddition, the offset information decoding unit 606 may secure a memoryfor sao_merge_left_flag at the time of starting a process, and set aninitial value 0.

Next, when sao_merge_left_flag indicates 0 (Yes is S6265), thearithmetic decoding control unit 6061 determines whether or not thetarget region is positioned at the upper end of a slice or a tile(S6266). Since the offset information is copied only from a region inthe same slice and in the same tile as with the determination of theleft end (S6263), the above-described determination is performed priorto the decoding of the upper offset information copy flagsao_merge_up_flag.

When the target region is not positioned at the upper end (No in S6266),the context arithmetic decoding unit 6062 loads a context for the upperoffset information copy flag sao_merge_up_flag. Then, the contextarithmetic decoding unit 6062 decodes the upper offset information copyflag sao_merge_up_flag (S6267).

When the target region is positioned at the upper end (Yes in S6266) orsubsequently to the decoding of the sao_merge_up_flag (S6267), thearithmetic decoding control unit 6061 determines whether or not thesao_merge_up_flag is 0 (S6268). Here, the sao_merge_up_flag being 0indicates that the offset information is not copied from the upperregion, and the sao_merge_up_flag being 1 indicates that the offsetinformation is copied from the upper region.

It is to be noted that, when the decoding of the sao_merge_up_flag(S6267) is not performed, a value of the sao_merge_up_flag does notexist. In this case, the value of the sao_merge_up_flag is processed as0. In addition, the offset information decoding unit 606 may secure amemory for sao_merge_up_flag at the time of starting a process, and setan initial value 0.

Next, when sao_merge_up_flag indicates 0 (Yes is S6268), the arithmeticdecoding control unit 6061 switches the decoding method to the bypassarithmetic decoding (S6269). With this, the bypass arithmetic decodingis used throughout the subsequent decoding steps.

Next, the bypass arithmetic decoding unit 6063 decodes the pixelclassifying method sao_type_idx and the offset absolute value sao_offset(S6270). Here, in this embodiment, the number of offset absolute valuessao_offset is four in any of the pixel classifying methods. However, thebypass arithmetic decoding unit 6063 may decode offset absolute valueswhich are different in number for each of the pixel classifying methods.

Then, the arithmetic decoding control unit 6061 determines whether ornot the pixel classifying method is the band offset (S6271). Here, thearithmetic decoding control unit 6061 uses the pixel classifying methodsao_type_idx for the determination.

In this example, the band offset is allocated with 0 as a value ofsao_type_idx. For that reason, the arithmetic decoding control unit 6061determines that the pixel classifying method is the band offset whensao_type_idx is 0, and that the pixel classifying method is not the bandoffset when sao_type_idx is not 0.

When the pixel classifying method is the band offset (Yes in S6271), thebypass arithmetic decoding unit 6063 decodes the offset value±signsao_offset_sign and the band offset coding start categorysao_band_position (S6272).

It is to be noted that, in this embodiment, the bypass arithmeticdecoding unit 6063 decodes the offset value±sign sao_offset_sign only inthe case of the band offset. However, the bypass arithmetic decodingunit 6063 may decode the offset value±sign sao_offset_sign in the caseof the edge offset as well. In this case, the offset value±signsao_offset_sign is decoded in Step S6270.

Further in this case, in Step S6270, the offset absolute valuesao_offset and the offset value±sign sao_offset_sign may be integratedand decoded as an offset value.

As described above, the bypass arithmetic coding (decoding) is used forthe coding (decoding) of all of the parameters following the top threeparameters of the offset processing ON/OFF flag sao_on_flag, the leftoffset information copy flag sao_merge_left_flag, and the upper offsetinformation copy flag sao_merge_up_flag. This eliminates the need forthe image coding apparatus and the image decoding apparatus to load andupdate contexts everywhere. Therefore, the throughput is improved.

FIG. 39B illustrates a result based on test conditions specified in theHEVC standard (see NPL 2) as an objective performance according to theexample of FIG. 39A.

In FIG. 39B, Configuration indicates coding parameter settingconditions. BD-rate indicates an objective index calculated from a peaksignal-to-noise ratio (PSNR) of a reconstructed image and a code amountof a coded stream. A negative BD-rate indicates improvement in theobjective performance, and a positive BD-rate indicates deterioration inthe objective performance. It is to be noted that BD-rate in FIG. 39Bindicates improvement or deterioration in the objective performanceaccording to the example of FIG. 39A, based on comparison withEmbodiment 1.

As illustrated in FIG. 39B, the BD-rate falls within a range of ±0.1.This indicates that the objective performance according to the exampleof FIG. 39A is substantially equivalent to the objective performance ofEmbodiment 1. This means that there is less deterioration in theobjective performance and the throughput is improved in the example ofFIG. 39A.

FIG. 42 is a flowchart which shows an example of the feature of theabove-described coding. First, the context arithmetic coding unit 5072consecutively codes the first information and the second information bythe context arithmetic coding (S711). The context arithmetic coding isan arithmetic coding which uses a variable probability. The firstinformation indicates whether or not to perform, for the first region ofan image, the sample adaptive offset (SAO) processing that is an offsetprocessing on a pixel value. The second information indicates whether ornot to use, in the SAO processing for the first region, information ofthe SAO processing on a region other than the first region.

For example, according to the example shown in FIG. 33, the contextarithmetic coding unit 5072 codes, as the first information, a value ofthe initial bit in the bit string of the parameter indicating the typeof the SAO processing for the first region.

Next, the bypass arithmetic coding unit 5073, after the firstinformation and the second information are coded, codes the otherinformation by the bypass arithmetic coding (S712). The bypassarithmetic coding is an arithmetic coding which uses a fixedprobability. Other information is information on the SAO processing forthe first region and different from the first information or the secondinformation. In addition, the other information includes thirdinformation indicating whether the SAO processing for the first regionis the edge offset processing or the band offset processing.

For example, according to the example shown in FIG. 33, the bypassarithmetic coding unit 5073 codes, as the third information, a value ofa next bit following the initial bit in the bit string of the parameterindicating the type of the SAO processing for the first region. Here,the value of the next bit following the initial bit indicates the bandoffset or the edge offset as in the example of FIG. 25.

FIG. 43 is a flowchart which shows an example of the feature of theabove-described decoding. First, the context arithmetic decoding unit6062 consecutively decodes the first information and the secondinformation by the context arithmetic decoding (S721). The contextarithmetic decoding is an arithmetic decoding which uses a variableprobability. The first information indicates whether or not to perform,for the first region of an image, the sample adaptive offset (SAO)processing that is an offset processing on a pixel value. The secondinformation indicates whether or not to use, in the SAO processing forthe first region, information of the SAO processing for a region otherthan the first region.

For example, according to the example shown in FIG. 33, the contextarithmetic decoding unit 6062 decodes, as the first information, a valueof the initial bit in the bit string of the parameter indicating thetype of the SAO processing for the first region, using the contextarithmetic decoding.

Next, the bypass arithmetic decoding unit 6063, after the firstinformation and the second information are decoded, decodes otherinformation by the bypass arithmetic decoding (S722). The bypassarithmetic decoding is an arithmetic decoding which uses a fixedprobability. Other information is information on the SAO processing forthe first region and different from the first information or the secondinformation. In addition, the other information includes the thirdinformation indicating whether the SAO processing on the first region isthe edge offset processing performed according to an edge or the bandoffset processing performed according to a pixel value.

For example, according to the example shown in FIG. 33, the bypassarithmetic decoding unit 6063 decodes, as the third information, a valueof the next bit following the initial bit in the bit string of theparameter indicating the type of the SAO processing for the firstregion. Here, the value of the next bit following the initial bitindicates the band offset or the edge offset as in the example of FIG.25.

It is to be noted that either the first information or the secondinformation may be coded first. Likewise, either the first informationor the second information may be decoded first. However, it is possibleto consecutively process the first information and the third informationwhich correspond to a single parameter, by processing the secondinformation earlier than the first information.

In addition, the order of coding is an order in which information iswritten into a coded stream as a sign (code), and the order of decodingis an order in which a sign (code) is read from a coded stream asinformation. Thus, the order of coding and decoding exemplified abovewith reference to the several diagrams corresponds to the order ofinformation in a coded stream. In addition, the order of syntax elementsexemplified above with reference to several diagrams corresponds to theorder of information in a coded stream and to the order of coding anddecoding.

In addition, the edge offset processing is, more specifically, performedbased on classification according to the edge. In addition, the bandoffset processing is, more specifically, performed based onclassification according to the pixel value.

In addition, the image coding apparatus may be an apparatus whichperforms only the processes illustrated in FIG. 42. Likewise, the imagedecoding apparatus may be an apparatus which performs only the processesillustrated in FIG. 43. Other processes may be performed by otherapparatuses.

As described above, the image coding apparatus according to thisembodiment is capable of coding an image with high processingefficiency. In addition, the image decoding apparatus according to thisembodiment is capable of decoding an image with high processingefficiency.

Each of the structural elements in each of the above-describedembodiments may be configured in the form of an exclusive hardwareproduct, or may be realized by executing a software program suitable forthe structural element. Each of the structural elements may be realizedby means of a program executing unit, such as a CPU and a processor,reading and executing the software program recorded on a recordingmedium such as a hard disk or a semiconductor memory.

In other words, the image coding apparatus and the image decodingapparatus include a control circuitry and a storage which iselectrically connected to the control circuitry (which is accessiblefrom the control circuitry). The control circuitry includes at least oneof the exclusive hardware product and the program executing unit. Inaddition, when the control circuitry includes the program executingunit, the storage stores a software program that is executed by theprogram executing unit.

Here, software that accomplishes the image coding apparatus according toeach of the above-described embodiments is a program as below.

In other words, the program causes a computer to execute an image codingmethod which includes: performing context arithmetic coding toconsecutively code (i) first information indicating whether or not toperform sample adaptive offset (SAO) processing for a first region of animage and (ii) second information indicating whether or not to use, inthe SAO processing for the first region, information on SAO processingfor a region other than the first region, the context arithmetic codingbeing arithmetic coding using a variable probability, the SAO processingbeing offset processing on a pixel value; and performing bypassarithmetic coding to code other information which is information on theSAO processing for the first region and different from the firstinformation or the second information, after the first information andthe second information are coded, the bypass arithmetic coding beingarithmetic coding using a fixed probability, wherein the otherinformation includes third information indicating whether the SAOprocessing for the first region is edge offset processing performedaccording to an edge, or band offset processing performed according tothe pixel value, in the performing of context arithmetic coding, a valueof an initial bit in a bit string of a parameter is coded as the firstinformation, the parameter indicating a type of the SAO processing forthe first region, and in the performing of bypass arithmetic coding, avalue of a next bit following the initial bit in the bit string of theparameter is coded as the third information.

In addition, the program may cause a computer to execute an imagedecoding method which includes: performing context arithmetic decodingto consecutively decode (i) first information indicating whether or notto perform sample adaptive offset (SAO) processing for a first region ofan image and (ii) second information indicating whether or not to use,in the SAO processing for the first region, information on SAOprocessing for a region other than the first region, the contextarithmetic decoding being arithmetic decoding using a variableprobability, the SAO processing being offset processing on a pixelvalue; and performing bypass arithmetic decoding to decode otherinformation which is information on the SAO processing for the firstregion and different from the first information or the secondinformation, after the first information and the second information aredecoded, the bypass arithmetic decoding being arithmetic decoding usinga fixed probability, wherein the other information includes thirdinformation indicating whether the SAO processing for the first regionis edge offset processing performed according to an edge, or band offsetprocessing performed according to the pixel value, in the performing ofcontext arithmetic decoding, a value of an initial bit in a bit stringof a parameter is decoded as the first information, the parameterindicating a type of the SAO processing for the first region, and in theperforming of bypass arithmetic decoding, a value of a next bitfollowing the initial bit in the bit string of the parameter is decodedas the third information.

In addition, each of the structural elements may be a circuit. Thecircuitries may be configured as a single circuitry as a whole or may bemutually different circuitries. In addition, each of the structuralelements may be implemented as a general purpose processor or as adedicated processor.

Although only some exemplary embodiments have been described above, thescope of the Claims of the present application is not limited to theseembodiments. Those skilled in the art will readily appreciate thatvarious modifications may be made in these exemplary embodiments andthat other embodiments may be obtained by arbitrarily combining thestructural elements of the embodiments without materially departing fromthe novel teachings and advantages of the subject matter recited in theappended Claims. Thus, such modifications and other embodiments are alsoincluded in the exemplary disclosure.

For example, when there is tendency in the symbol occurrence probabilityof the offset information other than the offset processing ON/OFF flagand the offset information copy flag, the image coding apparatus maycode the offset information using the context arithmetic coding.Likewise, the image decoding apparatus may decode the offset informationusing the context arithmetic decoding.

In addition, an optimal designing may be provided such that the offsetinformation to which the context arithmetic coding (decoding) is appliedand the offset information to which the bypass arithmetic coding(decoding) is applied are each consecutively coded (decoded) as much aspossible.

In addition, the information that indicates whether or not to performthe offset processing may be designed not as a part of the bit string ofthe offset processing ON/OFF flag sao_on_flag or the pixel classifyingmethod sao_type_idx. Even in such a case, the context arithmetic codingmay be used only for the information that indicates whether or not toperform the offset processing.

In addition, the offset information copy flag may indicate whether ornot to copy the offset information from an adjacent region which islocated other than left or above the target region. In addition, eitherone of the left offset information copy flag or the upper offsetinformation copy flag may be present.

For example, an image coding and decoding apparatus may include theimage coding apparatus and the image decoding apparatus. In addition,processes executed by a specific processing unit may be performed by adifferent processing unit. Furthermore, the order in which processes areperformed may be changed, or a plurality of processes may be performedin parallel. Furthermore, a dedicated or a common storage unit forstoring a variety of information items may be added to theconfiguration.

Embodiment 4

The processing described in each of embodiments can be simplyimplemented in an independent computer system, by recording, in arecording medium, a program for implementing the configurations of themoving picture coding method (image coding method) and the movingpicture decoding method (image decoding method) described in each ofembodiments. The recording media may be any recording media as long asthe program can be recorded, such as a magnetic disk, an optical disk, amagnetic optical disk, an IC card, and a semiconductor memory.

Hereinafter, the applications to the moving picture coding method (imagecoding method) and the moving picture decoding method (image decodingmethod) described in each of embodiments and systems using thereof willbe described. The system has a feature of having an image coding anddecoding apparatus that includes an image coding apparatus using theimage coding method and an image decoding apparatus using the imagedecoding method. Other configurations in the system can be changed asappropriate depending on the cases.

FIG. 44 illustrates an overall configuration of a content providingsystem ex100 for implementing content distribution services. The areafor providing communication services is divided into cells of desiredsize, and base stations ex106, ex107, ex108, ex109, and ex110 which arefixed wireless stations are placed in each of the cells.

The content providing system ex100 is connected to devices, such as acomputer ex111, a personal digital assistant (PDA) ex112, a cameraex113, a cellular phone ex114 and a game machine ex115, via the Internetex101, an Internet service provider ex102, a telephone network ex104, aswell as the base stations ex106 to ex110, respectively.

However, the configuration of the content providing system ex100 is notlimited to the configuration shown in FIG. 44, and a combination inwhich any of the elements are connected is acceptable. In addition, eachdevice may be directly connected to the telephone network ex104, ratherthan via the base stations ex106 to ex110 which are the fixed wirelessstations. Furthermore, the devices may be interconnected to each othervia a short distance wireless communication and others.

The camera ex113, such as a digital video camera, is capable ofcapturing video. A camera ex116, such as a digital camera, is capable ofcapturing both still images and video. Furthermore, the cellular phoneex114 may be the one that meets any of the standards such as GlobalSystem for Mobile Communications (GSM) (registered trademark), CodeDivision Multiple Access (CDMA), Wideband-Code Division Multiple Access(W-CDMA), Long Term Evolution (LTE), and High Speed Packet Access(HSPA). Alternatively, the cellular phone ex114 may be a PersonalHandyphone System (PHS).

In the content providing system ex100, a streaming server ex103 isconnected to the camera ex113 and others via the telephone network ex104and the base station ex109, which enables distribution of images of alive show and others. In such a distribution, a content (for example,video of a music live show) captured by the user using the camera ex113is coded as described above in each of embodiments (i.e., the camerafunctions as the image coding apparatus according to an aspect of thepresent disclosure), and the coded content is transmitted to thestreaming server ex103. On the other hand, the streaming server ex103carries out stream distribution of the transmitted content data to theclients upon their requests. The clients include the computer ex111, thePDA ex112, the camera ex113, the cellular phone ex114, and the gamemachine ex115 that are capable of decoding the above-mentioned codeddata. Each of the devices that have received the distributed datadecodes and reproduces the coded data (i.e., functions as the imagedecoding apparatus according to an aspect of the present disclosure).

The captured data may be coded by the camera ex113 or the streamingserver ex103 that transmits the data, or the coding processes may beshared between the camera ex113 and the streaming server ex103.Similarly, the distributed data may be decoded by the clients or thestreaming server ex103, or the decoding processes may be shared betweenthe clients and the streaming server ex103. Furthermore, the data of thestill images and video captured by not only the camera ex113 but alsothe camera ex116 may be transmitted to the streaming server ex103through the computer ex111. The coding processes may be performed by thecamera ex116, the computer ex111, or the streaming server ex103, orshared among them.

Furthermore, the coding and decoding processes may be performed by anLSI ex500 generally included in each of the computer ex111 and thedevices. The LSI ex500 may be configured of a single chip or a pluralityof chips. Software for coding and decoding video may be integrated intosome type of a recording medium (such as a CD-ROM, a flexible disk, anda hard disk) that is readable by the computer ex111 and others, and thecoding and decoding processes may be performed using the software.Furthermore, when the cellular phone ex114 is equipped with a camera,the video data obtained by the camera may be transmitted. The video datais data coded by the LSI ex500 included in the cellular phone ex114.

Furthermore, the streaming server ex103 may be composed of servers andcomputers, and may decentralize data and process the decentralized data,record, or distribute data.

As described above, the clients may receive and reproduce the coded datain the content providing system ex100. In other words, the clients canreceive and decode information transmitted by the user, and reproducethe decoded data in real time in the content providing system ex100, sothat the user who does not have any particular right and equipment canimplement personal broadcasting.

Aside from the example of the content providing system ex100, at leastone of the moving picture coding apparatus (image coding apparatus) andthe moving picture decoding apparatus (image decoding apparatus)described in each of embodiments may be implemented in a digitalbroadcasting system ex200 illustrated in FIG. 45. More specifically, abroadcast station ex201 communicates or transmits, via radio waves to abroadcast satellite ex202, multiplexed data obtained by multiplexingaudio data and others onto video data. The video data is data coded bythe moving picture coding method described in each of embodiments (i.e.,data coded by the image coding apparatus according to an aspect of thepresent disclosure). Upon receipt of the multiplexed data, the broadcastsatellite ex202 transmits radio waves for broadcasting. Then, a home-useantenna ex204 with a satellite broadcast reception function receives theradio waves. Next, a device such as a television (receiver) ex300 and aset top box (STB) ex217 decodes the received multiplexed data, andreproduces the decoded data (i.e., functions as the image decodingapparatus according to an aspect of the present disclosure).

Furthermore, a reader/recorder ex218 (i) reads and decodes themultiplexed data recorded on a recording medium ex215, such as a DVD anda BD, or (i) codes video signals in the recording medium ex215, and insome cases, writes data obtained by multiplexing an audio signal on thecoded data. The reader/recorder ex218 can include the moving picturedecoding apparatus or the moving picture coding apparatus as shown ineach of embodiments. In this case, the reproduced video signals aredisplayed on the monitor ex219, and can be reproduced by another deviceor system using the recording medium ex215 on which the multiplexed datais recorded. It is also possible to implement the moving picturedecoding apparatus in the set top box ex217 connected to the cable ex203for a cable television or to the antenna ex204 for satellite and/orterrestrial broadcasting, so as to display the video signals on themonitor ex219 of the television ex300. The moving picture decodingapparatus may be implemented not in the set top box but in thetelevision ex300.

FIG. 46 illustrates the television (receiver) ex300 that uses the movingpicture coding method and the moving picture decoding method describedin each of embodiments. The television ex300 includes: a tuner ex301that obtains or provides multiplexed data obtained by multiplexing audiodata onto video data, through the antenna ex204 or the cable ex203, etc.that receives a broadcast; a modulation/demodulation unit ex302 thatdemodulates the received multiplexed data or modulates data intomultiplexed data to be supplied outside; and amultiplexing/demultiplexing unit ex303 that demultiplexes the modulatedmultiplexed data into video data and audio data, or multiplexes videodata and audio data coded by a signal processing unit ex306 into data.

The television ex300 further includes: a signal processing unit ex306including an audio signal processing unit ex304 and a video signalprocessing unit ex305 that decode audio data and video data and codeaudio data and video data, respectively (which function as the imagecoding apparatus and the image decoding apparatus according to theaspects of the present disclosure); and an output unit ex309 including aspeaker ex307 that provides the decoded audio signal, and a display unitex308 that displays the decoded video signal, such as a display.Furthermore, the television ex300 includes an interface unit ex317including an operation input unit ex312 that receives an input of a useroperation. Furthermore, the television ex300 includes a control unitex310 that controls overall each constituent element of the televisionex300, and a power supply circuit unit ex311 that supplies power to eachof the elements. Other than the operation input unit ex312, theinterface unit ex317 may include: a bridge ex313 that is connected to anexternal device, such as the reader/recorder ex218; a slot unit ex314for enabling attachment of the recording medium ex216, such as an SDcard; a driver ex315 to be connected to an external recording medium,such as a hard disk; and a modem ex316 to be connected to a telephonenetwork. Here, the recording medium ex216 can electrically recordinformation using a non-volatile/volatile semiconductor memory elementfor storage. The constituent elements of the television ex300 areconnected to each other through a synchronous bus.

First, the configuration in which the television ex300 decodesmultiplexed data obtained from outside through the antenna ex204 andothers and reproduces the decoded data will be described. In thetelevision ex300, upon a user operation through a remote controllerex220 and others, the multiplexing/demultiplexing unit ex303demultiplexes the multiplexed data demodulated by themodulation/demodulation unit ex302, under control of the control unitex310 including a CPU. Furthermore, the audio signal processing unitex304 decodes the demultiplexed audio data, and the video signalprocessing unit ex305 decodes the demultiplexed video data, using thedecoding method described in each of embodiments, in the televisionex300. The output unit ex309 provides the decoded video signal and audiosignal outside, respectively. When the output unit ex309 provides thevideo signal and the audio signal, the signals may be temporarily storedin buffers ex318 and ex319, and others so that the signals arereproduced in synchronization with each other. Furthermore, thetelevision ex300 may read multiplexed data not through a broadcast andothers but from the recording media ex215 and ex216, such as a magneticdisk, an optical disk, and a SD card. Next, a configuration in which thetelevision ex300 codes an audio signal and a video signal, and transmitsthe data outside or writes the data on a recording medium will bedescribed. In the television ex300, upon a user operation through theremote controller ex220 and others, the audio signal processing unitex304 codes an audio signal, and the video signal processing unit ex305codes a video signal, under control of the control unit ex310 using thecoding method described in each of embodiments. Themultiplexing/demultiplexing unit ex303 multiplexes the coded videosignal and audio signal, and provides the resulting signal outside. Whenthe multiplexing/demultiplexing unit ex303 multiplexes the video signaland the audio signal, the signals may be temporarily stored in thebuffers ex320 and ex321, and others so that the signals are reproducedin synchronization with each other. Here, the buffers ex318, ex319,ex320, and ex321 may be plural as illustrated, or at least one buffermay be shared in the television ex300. Furthermore, data may be storedin a buffer so that the system overflow and underflow may be avoidedbetween the modulation/demodulation unit ex302 and themultiplexing/demultiplexing unit ex303, for example.

Furthermore, the television ex300 may include a configuration forreceiving an AV input from a microphone or a camera other than theconfiguration for obtaining audio and video data from a broadcast or arecording medium, and may code the obtained data. Although thetelevision ex300 can code, multiplex, and provide outside data in thedescription, it may be capable of only receiving, decoding, andproviding outside data but not the coding, multiplexing, and providingoutside data.

Furthermore, when the reader/recorder ex218 reads or writes multiplexeddata from or on a recording medium, one of the television ex300 and thereader/recorder ex218 may decode or code the multiplexed data, and thetelevision ex300 and the reader/recorder ex218 may share the decoding orcoding.

As an example, FIG. 47 illustrates a configuration of an informationreproducing/recording unit ex400 when data is read or written from or onan optical disk. The information reproducing/recording unit ex400includes constituent elements ex401, ex402, ex403, ex404, ex405, ex406,and ex407 to be described hereinafter. The optical head ex401 irradiatesa laser spot in a recording surface of the recording medium ex215 thatis an optical disk to write information, and detects reflected lightfrom the recording surface of the recording medium ex215 to read theinformation. The modulation recording unit ex402 electrically drives asemiconductor laser included in the optical head ex401, and modulatesthe laser light according to recorded data. The reproductiondemodulating unit ex403 amplifies a reproduction signal obtained byelectrically detecting the reflected light from the recording surfaceusing a photo detector included in the optical head ex401, anddemodulates the reproduction signal by separating a signal componentrecorded on the recording medium ex215 to reproduce the necessaryinformation. The buffer ex404 temporarily holds the information to berecorded on the recording medium ex215 and the information reproducedfrom the recording medium ex215. The disk motor ex405 rotates therecording medium ex215. The servo control unit ex406 moves the opticalhead ex401 to a predetermined information track while controlling therotation drive of the disk motor ex405 so as to follow the laser spot.The system control unit ex407 controls overall the informationreproducing/recording unit ex400. The reading and writing processes canbe implemented by the system control unit ex407 using variousinformation stored in the buffer ex404 and generating and adding newinformation as necessary, and by the modulation recording unit ex402,the reproduction demodulating unit ex403, and the servo control unitex406 that record and reproduce information through the optical headex401 while being operated in a coordinated manner. The system controlunit ex407 includes, for example, a microprocessor, and executesprocessing by causing a computer to execute a program for read andwrite.

Although the optical head ex401 irradiates a laser spot in thedescription, it may perform high-density recording using near fieldlight.

FIG. 48 illustrates the recording medium ex215 that is the optical disk.On the recording surface of the recording medium ex215, guide groovesare spirally formed, and an information track ex230 records, in advance,address information indicating an absolute position on the diskaccording to change in a shape of the guide grooves. The addressinformation includes information for determining positions of recordingblocks ex231 that are a unit for recording data. Reproducing theinformation track ex230 and reading the address information in anapparatus that records and reproduces data can lead to determination ofthe positions of the recording blocks. Furthermore, the recording mediumex215 includes a data recording area ex233, an inner circumference areaex232, and an outer circumference area ex234. The data recording areaex233 is an area for use in recording the user data. The innercircumference area ex232 and the outer circumference area ex234 that areinside and outside of the data recording area ex233, respectively arefor specific use except for recording the user data. The informationreproducing/recording unit 400 reads and writes coded audio, coded videodata, or multiplexed data obtained by multiplexing the coded audio andvideo data, from and on the data recording area ex233 of the recordingmedium ex215.

Although an optical disk having a layer, such as a DVD and a BD isdescribed as an example in the description, the optical disk is notlimited to such, and may be an optical disk having a multilayerstructure and capable of being recorded on a part other than thesurface. Furthermore, the optical disk may have a structure formultidimensional recording/reproduction, such as recording ofinformation using light of colors with different wavelengths in the sameportion of the optical disk and for recording information havingdifferent layers from various angles.

Furthermore, a car ex210 having an antenna ex205 can receive data fromthe satellite ex202 and others, and reproduce video on a display devicesuch as a car navigation system ex211 set in the car ex210, in thedigital broadcasting system ex200. Here, a configuration of the carnavigation system ex211 will be a configuration, for example, includinga GPS receiving unit from the configuration illustrated in FIG. 46. Thesame will be true for the configuration of the computer ex111, thecellular phone ex114, and others.

FIG. 49A illustrates the cellular phone ex114 that uses the movingpicture coding method and the moving picture decoding method describedin embodiments. The cellular phone ex114 includes: an antenna ex350 fortransmitting and receiving radio waves through the base station ex110; acamera unit ex365 capable of capturing moving and still images; and adisplay unit ex358 such as a liquid crystal display for displaying thedata such as decoded video captured by the camera unit ex365 or receivedby the antenna ex350. The cellular phone ex114 further includes: a mainbody unit including an operation key unit ex366; an audio output unitex357 such as a speaker for output of audio; an audio input unit ex356such as a microphone for input of audio; a memory unit ex367 for storingcaptured video or still pictures, recorded audio, coded or decoded dataof the received video, the still pictures, e-mails, or others; and aslot unit ex364 that is an interface unit for a recording medium thatstores data in the same manner as the memory unit ex367.

Next, an example of a configuration of the cellular phone ex114 will bedescribed with reference to FIG. 49B. In the cellular phone ex114, amain control unit ex360 designed to control overall each unit of themain body including the display unit ex358 as well as the operation keyunit ex366 is connected mutually, via a synchronous bus ex370, to apower supply circuit unit ex361, an operation input control unit ex362,a video signal processing unit ex355, a camera interface unit ex363, aliquid crystal display (LCD) control unit ex359, amodulation/demodulation unit ex352, a multiplexing/demultiplexing unitex353, an audio signal processing unit ex354, the slot unit ex364, andthe memory unit ex367.

When a call-end key or a power key is turned ON by a user's operation,the power supply circuit unit ex361 supplies the respective units withpower from a battery pack so as to activate the cell phone ex114.

In the cellular phone ex114, the audio signal processing unit ex354converts the audio signals collected by the audio input unit ex356 invoice conversation mode into digital audio signals under the control ofthe main control unit ex360 including a CPU, ROM, and RAM. Then, themodulation/demodulation unit ex352 performs spread spectrum processingon the digital audio signals, and the transmitting and receiving unitex351 performs digital-to-analog conversion and frequency conversion onthe data, so as to transmit the resulting data via the antenna ex350.Also, in the cellular phone ex114, the transmitting and receiving unitex351 amplifies the data received by the antenna ex350 in voiceconversation mode and performs frequency conversion and theanalog-to-digital conversion on the data. Then, themodulation/demodulation unit ex352 performs inverse spread spectrumprocessing on the data, and the audio signal processing unit ex354converts it into analog audio signals, so as to output them via theaudio output unit ex357.

Furthermore, when an e-mail in data communication mode is transmitted,text data of the e-mail inputted by operating the operation key unitex366 and others of the main body is sent out to the main control unitex360 via the operation input control unit ex362. The main control unitex360 causes the modulation/demodulation unit ex352 to perform spreadspectrum processing on the text data, and the transmitting and receivingunit ex351 performs the digital-to-analog conversion and the frequencyconversion on the resulting data to transmit the data to the basestation ex110 via the antenna ex350. When an e-mail is received,processing that is approximately inverse to the processing fortransmitting an e-mail is performed on the received data, and theresulting data is provided to the display unit ex358.

When video, still images, or video and audio in data communication modeis or are transmitted, the video signal processing unit ex355 compressesand codes video signals supplied from the camera unit ex365 using themoving picture coding method shown in each of embodiments (i.e.,functions as the image coding apparatus according to the aspect of thepresent disclosure), and transmits the coded video data to themultiplexing/demultiplexing unit ex353. In contrast, during when thecamera unit ex365 captures video, still images, and others, the audiosignal processing unit ex354 codes audio signals collected by the audioinput unit ex356, and transmits the coded audio data to themultiplexing/demultiplexing unit ex353.

The multiplexing/demultiplexing unit ex353 multiplexes the coded videodata supplied from the video signal processing unit ex355 and the codedaudio data supplied from the audio signal processing unit ex354, using apredetermined method. Then, the modulation/demodulation unit(modulation/demodulation circuit unit) ex352 performs spread spectrumprocessing on the multiplexed data, and the transmitting and receivingunit ex351 performs digital-to-analog conversion and frequencyconversion on the data so as to transmit the resulting data via theantenna ex350.

When receiving data of a video file which is linked to a Web page andothers in data communication mode or when receiving an e-mail with videoand/or audio attached, in order to decode the multiplexed data receivedvia the antenna ex350, the multiplexing/demultiplexing unit ex353demultiplexes the multiplexed data into a video data bit stream and anaudio data bit stream, and supplies the video signal processing unitex355 with the coded video data and the audio signal processing unitex354 with the coded audio data, through the synchronous bus ex370. Thevideo signal processing unit ex355 decodes the video signal using amoving picture decoding method corresponding to the moving picturecoding method shown in each of embodiments (i.e., functions as the imagedecoding apparatus according to the aspect of the present disclosure),and then the display unit ex358 displays, for instance, the video andstill images included in the video file linked to the Web page via theLCD control unit ex359. Furthermore, the audio signal processing unitex354 decodes the audio signal, and the audio output unit ex357 providesthe audio.

Furthermore, similarly to the television ex300, a terminal such as thecellular phone ex114 probably have 3 types of implementationconfigurations including not only (i) a transmitting and receivingterminal including both a coding apparatus and a decoding apparatus, butalso (ii) a transmitting terminal including only a coding apparatus and(iii) a receiving terminal including only a decoding apparatus. Althoughthe digital broadcasting system ex200 receives and transmits themultiplexed data obtained by multiplexing audio data onto video data inthe description, the multiplexed data may be data obtained bymultiplexing not audio data but character data related to video ontovideo data, and may be not multiplexed data but video data itself.

As such, the moving picture coding method and the moving picturedecoding method in each of embodiments can be used in any of the devicesand systems described. Thus, the advantages described in each ofembodiments can be obtained.

Furthermore, various modifications and revisions can be made in any ofthe embodiments in the present disclosure.

Embodiment 5

Video data can be generated by switching, as necessary, between (i) themoving picture coding method or the moving picture coding apparatusshown in each of embodiments and (ii) a moving picture coding method ora moving picture coding apparatus in conformity with a differentstandard, such as MPEG-2, MPEG-4 AVC, and VC-1.

Here, when a plurality of video data that conforms to the differentstandards is generated and is then decoded, the decoding methods need tobe selected to conform to the different standards. However, since towhich standard each of the plurality of the video data to be decodedconform cannot be detected, an appropriate decoding method cannot beselected.

In view of this, multiplexed data obtained by multiplexing audio dataand others onto video data has a structure including identificationinformation indicating to which standard the video data conforms. Thespecific structure of the multiplexed data including the video datagenerated in the moving picture coding method and by the moving picturecoding apparatus shown in each of embodiments will be hereinafterdescribed. The multiplexed data is a digital stream in the MPEG-2Transport Stream format.

FIG. 50 illustrates a structure of the multiplexed data. As illustratedin FIG. 51, the multiplexed data can be obtained by multiplexing atleast one of a video stream, an audio stream, a presentation graphicsstream (PG), and an interactive graphics stream. The video streamrepresents primary video and secondary video of a movie, the audiostream (IG) represents a primary audio part and a secondary audio partto be mixed with the primary audio part, and the presentation graphicsstream represents subtitles of the movie. Here, the primary video isnormal video to be displayed on a screen, and the secondary video isvideo to be displayed on a smaller window in the primary video.Furthermore, the interactive graphics stream represents an interactivescreen to be generated by arranging the GUI components on a screen. Thevideo stream is coded in the moving picture coding method or by themoving picture coding apparatus shown in each of embodiments, or in amoving picture coding method or by a moving picture coding apparatus inconformity with a conventional standard, such as MPEG-2, MPEG-4 AVC, andVC-1. The audio stream is coded in accordance with a standard, such asDolby-AC-3, Dolby Digital Plus, MLP, DTS, DTS-HD, and linear PCM.

Each stream included in the multiplexed data is identified by PID. Forexample, 0x1011 is allocated to the video stream to be used for video ofa movie, 0x1100 to 0x111F are allocated to the audio streams, 0x1200 to0x121F are allocated to the presentation graphics streams, 0x1400 to0x141F are allocated to the interactive graphics streams, 0x1B00 to0x1B1F are allocated to the video streams to be used for secondary videoof the movie, and 0x1A00 to 0x1A1F are allocated to the audio streams tobe used for the secondary audio to be mixed with the primary audio.

FIG. 51 schematically illustrates how data is multiplexed. First, avideo stream ex235 composed of video frames and an audio stream ex238composed of audio frames are transformed into a stream of PES packetsex236 and a stream of PES packets ex239, and further into TS packetsex237 and TS packets ex240, respectively. Similarly, data of apresentation graphics stream ex241 and data of an interactive graphicsstream ex244 are transformed into a stream of PES packets ex242 and astream of PES packets ex245, and further into TS packets ex243 and TSpackets ex246, respectively. These TS packets are multiplexed into astream to obtain multiplexed data ex247.

FIG. 52 illustrates how a video stream is stored in a stream of PESpackets in more detail. The first bar in FIG. 52 shows a video framestream in a video stream. The second bar shows the stream of PESpackets. As indicated by arrows denoted as yy1, yy2, yy3, and yy4 inFIG. 52, the video stream is divided into pictures as I pictures, Bpictures, and P pictures each of which is a video presentation unit, andthe pictures are stored in a payload of each of the PES packets. Each ofthe PES packets has a PES header, and the PES header stores aPresentation Time-Stamp (PTS) indicating a display time of the picture,and a Decoding Time-Stamp (DTS) indicating a decoding time of thepicture.

FIG. 53 illustrates a format of TS packets to be finally written on themultiplexed data. Each of the TS packets is a 188-byte fixed lengthpacket including a 4-byte TS header having information, such as a PIDfor identifying a stream and a 184-byte TS payload for storing data. ThePES packets are divided, and stored in the TS payloads, respectively.When a BD ROM is used, each of the TS packets is given a 4-byteTP_Extra_Header, thus resulting in 192-byte source packets. The sourcepackets are written on the multiplexed data. The TP_Extra_Header storesinformation such as an Arrival_Time_Stamp (ATS). The ATS shows atransfer start time at which each of the TS packets is to be transferredto a PID filter. The source packets are arranged in the multiplexed dataas shown at the bottom of FIG. 53. The numbers incrementing from thehead of the multiplexed data are called source packet numbers (SPNs).

Each of the TS packets included in the multiplexed data includes notonly streams of audio, video, subtitles and others, but also a ProgramAssociation Table (PAT), a Program Map Table (PMT), and a Program ClockReference (PCR). The PAT shows what a PID in a PMT used in themultiplexed data indicates, and a PID of the PAT itself is registered aszero. The PMT stores PIDs of the streams of video, audio, subtitles andothers included in the multiplexed data, and attribute information ofthe streams corresponding to the PIDs. The PMT also has variousdescriptors relating to the multiplexed data. The descriptors haveinformation such as copy control information showing whether copying ofthe multiplexed data is permitted or not. The PCR stores STC timeinformation corresponding to an ATS showing when the PCR packet istransferred to a decoder, in order to achieve synchronization between anArrival Time Clock (ATC) that is a time axis of ATSs, and an System TimeClock (STC) that is a time axis of PTSs and DTSs.

FIG. 54 illustrates the data structure of the PMT in detail. A PMTheader is disposed at the top of the PMT. The PMT header describes thelength of data included in the PMT and others. A plurality ofdescriptors relating to the multiplexed data is disposed after the PMTheader. Information such as the copy control information is described inthe descriptors. After the descriptors, a plurality of pieces of streaminformation relating to the streams included in the multiplexed data isdisposed. Each piece of stream information includes stream descriptorseach describing information, such as a stream type for identifying acompression codec of a stream, a stream PID, and stream attributeinformation (such as a frame rate or an aspect ratio). The streamdescriptors are equal in number to the number of streams in themultiplexed data.

When the multiplexed data is recorded on a recording medium and others,it is recorded together with multiplexed data information files.

Each of the multiplexed data information files is management informationof the multiplexed data as shown in FIG. 55. The multiplexed datainformation files are in one to one correspondence with the multiplexeddata, and each of the files includes multiplexed data information,stream attribute information, and an entry map.

As illustrated in FIG. 55, the multiplexed data information includes asystem rate, a reproduction start time, and a reproduction end time. Thesystem rate indicates the maximum transfer rate at which a system targetdecoder to be described later transfers the multiplexed data to a PIDfilter. The intervals of the ATSs included in the multiplexed data areset to not higher than a system rate. The reproduction start timeindicates a PTS in a video frame at the head of the multiplexed data. Aninterval of one frame is added to a PTS in a video frame at the end ofthe multiplexed data, and the PTS is set to the reproduction end time.

As shown in FIG. 56, a piece of attribute information is registered inthe stream attribute information, for each PID of each stream includedin the multiplexed data. Each piece of attribute information hasdifferent information depending on whether the corresponding stream is avideo stream, an audio stream, a presentation graphics stream, or aninteractive graphics stream. Each piece of video stream attributeinformation carries information including what kind of compression codecis used for compressing the video stream, and the resolution, aspectratio and frame rate of the pieces of picture data that is included inthe video stream. Each piece of audio stream attribute informationcarries information including what kind of compression codec is used forcompressing the audio stream, how many channels are included in theaudio stream, which language the audio stream supports, and how high thesampling frequency is. The video stream attribute information and theaudio stream attribute information are used for initialization of adecoder before the player plays back the information.

In the present embodiment, the multiplexed data to be used is of astream type included in the PMT. Furthermore, when the multiplexed datais recorded on a recording medium, the video stream attributeinformation included in the multiplexed data information is used. Morespecifically, the moving picture coding method or the moving picturecoding apparatus described in each of embodiments includes a step or aunit for allocating unique information indicating video data generatedby the moving picture coding method or the moving picture codingapparatus in each of embodiments, to the stream type included in the PMTor the video stream attribute information. With the configuration, thevideo data generated by the moving picture coding method or the movingpicture coding apparatus described in each of embodiments can bedistinguished from video data that conforms to another standard.

Furthermore, FIG. 57 illustrates steps of the moving picture decodingmethod according to the present embodiment. In Step exS100, the streamtype included in the PMT or the video stream attribute informationincluded in the multiplexed data information is obtained from themultiplexed data. Next, in Step exS101, it is determined whether or notthe stream type or the video stream attribute information indicates thatthe multiplexed data is generated by the moving picture coding method orthe moving picture coding apparatus in each of embodiments. When it isdetermined that the stream type or the video stream attributeinformation indicates that the multiplexed data is generated by themoving picture coding method or the moving picture coding apparatus ineach of embodiments, in Step exS102, decoding is performed by the movingpicture decoding method in each of embodiments. Furthermore, when thestream type or the video stream attribute information indicatesconformance to the conventional standards, such as MPEG-2, MPEG-4 AVC,and VC-1, in Step exS103, decoding is performed by a moving picturedecoding method in conformity with the conventional standards.

As such, allocating a new unique value to the stream type or the videostream attribute information enables determination whether or not themoving picture decoding method or the moving picture decoding apparatusthat is described in each of embodiments can perform decoding. Even whenmultiplexed data that conforms to a different standard is input, anappropriate decoding method or apparatus can be selected. Thus, itbecomes possible to decode information without any error. Furthermore,the moving picture coding method or apparatus, or the moving picturedecoding method or apparatus in the present embodiment can be used inthe devices and systems described above.

Embodiment 6

Each of the moving picture coding method, the moving picture codingapparatus, the moving picture decoding method, and the moving picturedecoding apparatus in each of embodiments is typically achieved in theform of an integrated circuit or a Large Scale Integrated (LSI) circuit.As an example of the LSI, FIG. 58 illustrates a configuration of the LSIex500 that is made into one chip. The LSI ex500 includes elements ex501,ex502, ex503, ex504, ex505, ex506, ex507, ex508, and ex509 to bedescribed below, and the elements are connected to each other through abus ex510. The power supply circuit unit ex505 is activated by supplyingeach of the elements with power when the power supply circuit unit ex505is turned on.

For example, when coding is performed, the LSI ex500 receives an AVsignal from a microphone ex117, a camera ex113, and others through an AVIO ex509 under control of a control unit ex501 including a CPU ex502, amemory controller ex503, a stream controller ex504, and a drivingfrequency control unit ex512. The received AV signal is temporarilystored in an external memory ex511, such as an SDRAM. Under control ofthe control unit ex501, the stored data is segmented into data portionsaccording to the processing amount and speed to be transmitted to asignal processing unit ex507. Then, the signal processing unit ex507codes an audio signal and/or a video signal. Here, the coding of thevideo signal is the coding described in each of embodiments.Furthermore, the signal processing unit ex507 sometimes multiplexes thecoded audio data and the coded video data, and a stream IO ex506provides the multiplexed data outside. The provided multiplexed data istransmitted to the base station ex107, or written on the recordingmedium ex215. When data sets are multiplexed, the data should betemporarily stored in the buffer ex508 so that the data sets aresynchronized with each other.

Although the memory ex511 is an element outside the LSI ex500, it may beincluded in the LSI ex500. The buffer ex508 is not limited to onebuffer, but may be composed of buffers. Furthermore, the LSI ex500 maybe made into one chip or a plurality of chips.

Furthermore, although the control unit ex501 includes the CPU ex502, thememory controller ex503, the stream controller ex504, the drivingfrequency control unit ex512, the configuration of the control unitex501 is not limited to such. For example, the signal processing unitex507 may further include a CPU. Inclusion of another CPU in the signalprocessing unit ex507 can improve the processing speed. Furthermore, asanother example, the CPU ex502 may serve as or be a part of the signalprocessing unit ex507, and, for example, may include an audio signalprocessing unit. In such a case, the control unit ex501 includes thesignal processing unit ex507 or the CPU ex502 including a part of thesignal processing unit ex507.

The name used here is LSI, but it may also be called IC, system LSI,super LSI, or ultra LSI depending on the degree of integration.

Moreover, ways to achieve integration are not limited to the LSI, and aspecial circuit or a general purpose processor and so forth can alsoachieve the integration. Field Programmable Gate Array (FPGA) that canbe programmed after manufacturing LSIs or a reconfigurable processorthat allows re-configuration of the connection or configuration of anLSI can be used for the same purpose. Such a programmable logic devicecan typically execute the moving picture coding method and/or the movingpicture decoding method according to any of the above embodiments, byloading or reading from a memory or the like one or more programs thatare included in software or firmware.

In the future, with advancement in semiconductor technology, a brand-newtechnology may replace LSI. The functional blocks can be integratedusing such a technology. The possibility is that the present disclosureis applied to biotechnology.

Embodiment 7

When video data generated in the moving picture coding method or by themoving picture coding apparatus described in each of embodiments isdecoded, compared to when video data that conforms to a conventionalstandard, such as MPEG-2, MPEG-4 AVC, and VC-1 is decoded, theprocessing amount probably increases. Thus, the LSI ex500 needs to beset to a driving frequency higher than that of the CPU ex502 to be usedwhen video data in conformity with the conventional standard is decoded.However, when the driving frequency is set higher, the power consumptionincreases.

In view of this, the moving picture decoding apparatus, such as thetelevision ex300 and the LSI ex500 is configured to determine to whichstandard the video data conforms, and switch between the drivingfrequencies according to the determined standard. FIG. 59 illustrates aconfiguration ex800 in the present embodiment. A driving frequencyswitching unit ex803 sets a driving frequency to a higher drivingfrequency when video data is generated by the moving picture codingmethod or the moving picture coding apparatus described in each ofembodiments. Then, the driving frequency switching unit ex803 instructsa decoding processing unit ex801 that executes the moving picturedecoding method described in each of embodiments to decode the videodata. When the video data conforms to the conventional standard, thedriving frequency switching unit ex803 sets a driving frequency to alower driving frequency than that of the video data generated by themoving picture coding method or the moving picture coding apparatusdescribed in each of embodiments. Then, the driving frequency switchingunit ex803 instructs the decoding processing unit ex802 that conforms tothe conventional standard to decode the video data.

More specifically, the driving frequency switching unit ex803 includesthe CPU ex502 and the driving frequency control unit ex512 in FIG. 58.Here, each of the decoding processing unit ex801 that executes themoving picture decoding method described in each of embodiments and thedecoding processing unit ex802 that conforms to the conventionalstandard corresponds to the signal processing unit ex507 in FIG. 58. TheCPU ex502 determines to which standard the video data conforms. Then,the driving frequency control unit ex512 determines a driving frequencybased on a signal from the CPU ex502. Furthermore, the signal processingunit ex507 decodes the video data based on the signal from the CPUex502. For example, the identification information described inEmbodiment 5 is probably used for identifying the video data. Theidentification information is not limited to the one described inEmbodiment 5 but may be any information as long as the informationindicates to which standard the video data conforms. For example, whenwhich standard video data conforms to can be determined based on anexternal signal for determining that the video data is used for atelevision or a disk, etc., the determination may be made based on suchan external signal. Furthermore, the CPU ex502 selects a drivingfrequency based on, for example, a look-up table in which the standardsof the video data are associated with the driving frequencies as shownin FIG. 61. The driving frequency can be selected by storing the look-uptable in the buffer ex508 and in an internal memory of an LSI, and withreference to the look-up table by the CPU ex502.

FIG. 60 illustrates steps for executing a method in the presentembodiment. First, in Step exS200, the signal processing unit ex507obtains identification information from the multiplexed data. Next, inStep exS201, the CPU ex502 determines whether or not the video data isgenerated by the coding method and the coding apparatus described ineach of embodiments, based on the identification information. When thevideo data is generated by the moving picture coding method and themoving picture coding apparatus described in each of embodiments, inStep exS202, the CPU ex502 transmits a signal for setting the drivingfrequency to a higher driving frequency to the driving frequency controlunit ex512. Then, the driving frequency control unit ex512 sets thedriving frequency to the higher driving frequency. On the other hand,when the identification information indicates that the video dataconforms to the conventional standard, such as MPEG-2, MPEG-4 AVC, andVC-1, in Step exS203, the CPU ex502 transmits a signal for setting thedriving frequency to a lower driving frequency to the driving frequencycontrol unit ex512. Then, the driving frequency control unit ex512 setsthe driving frequency to the lower driving frequency than that in thecase where the video data is generated by the moving picture codingmethod and the moving picture coding apparatus described in each ofembodiment.

Furthermore, along with the switching of the driving frequencies, thepower conservation effect can be improved by changing the voltage to beapplied to the LSI ex500 or an apparatus including the LSI ex500. Forexample, when the driving frequency is set lower, the voltage to beapplied to the LSI ex500 or the apparatus including the LSI ex500 isprobably set to a voltage lower than that in the case where the drivingfrequency is set higher.

Furthermore, when the processing amount for decoding is larger, thedriving frequency may be set higher, and when the processing amount fordecoding is smaller, the driving frequency may be set lower as themethod for setting the driving frequency. Thus, the setting method isnot limited to the ones described above. For example, when theprocessing amount for decoding video data in conformity with MPEG-4 AVCis larger than the processing amount for decoding video data generatedby the moving picture coding method and the moving picture codingapparatus described in each of embodiments, the driving frequency isprobably set in reverse order to the setting described above.

Furthermore, the method for setting the driving frequency is not limitedto the method for setting the driving frequency lower. For example, whenthe identification information indicates that the video data isgenerated by the moving picture coding method and the moving picturecoding apparatus described in each of embodiments, the voltage to beapplied to the LSI ex500 or the apparatus including the LSI ex500 isprobably set higher. When the identification information indicates thatthe video data conforms to the conventional standard, such as MPEG-2,MPEG-4 AVC, and VC-1, the voltage to be applied to the LSI ex500 or theapparatus including the LSI ex500 is probably set lower. As anotherexample, when the identification information indicates that the videodata is generated by the moving picture coding method and the movingpicture coding apparatus described in each of embodiments, the drivingof the CPU ex502 does not probably have to be suspended. When theidentification information indicates that the video data conforms to theconventional standard, such as MPEG-2, MPEG-4 AVC, and VC-1, the drivingof the CPU ex502 is probably suspended at a given time because the CPUex502 has extra processing capacity. Even when the identificationinformation indicates that the video data is generated by the movingpicture coding method and the moving picture coding apparatus describedin each of embodiments, in the case where the CPU ex502 has extraprocessing capacity, the driving of the CPU ex502 is probably suspendedat a given time. In such a case, the suspending time is probably setshorter than that in the case where when the identification informationindicates that the video data conforms to the conventional standard,such as MPEG-2, MPEG-4 AVC, and VC-1.

Accordingly, the power conservation effect can be improved by switchingbetween the driving frequencies in accordance with the standard to whichthe video data conforms. Furthermore, when the LSI ex500 or theapparatus including the LSI ex500 is driven using a battery, the batterylife can be extended with the power conservation effect.

Embodiment 8

There are cases where a plurality of video data that conforms todifferent standards, is provided to the devices and systems, such as atelevision and a cellular phone. In order to enable decoding theplurality of video data that conforms to the different standards, thesignal processing unit ex507 of the LSI ex500 needs to conform to thedifferent standards. However, increase in the scale of the circuit ofthe LSI ex500 and increase in the cost arise with the individual use ofthe signal processing units ex507 that conform to the respectivestandards.

In view of this, what is conceived is a configuration in which thedecoding processing unit for implementing the moving picture decodingmethod described in each of embodiments and the decoding processing unitthat conforms to the conventional standard, such as MPEG-2, MPEG-4 AVC,and VC-1 are partly shared. Ex900 in FIG. 62A shows an example of theconfiguration. For example, the moving picture decoding method describedin each of embodiments and the moving picture decoding method thatconforms to MPEG-4 AVC have, partly in common, the details ofprocessing, such as entropy coding, inverse quantization, deblockingfiltering, and motion compensated prediction. The details of processingto be shared probably include use of a decoding processing unit ex902that conforms to MPEG-4 AVC. In contrast, a dedicated decodingprocessing unit ex901 is probably used for other processing which isunique to an aspect of the present disclosure and does not conform toMPEG-4 AVC. Since the aspect of the present disclosure is characterizedby entropy decoding in particular, for example, the dedicated decodingprocessing unit ex901 is used for entropy decoding. Otherwise, thedecoding processing unit is probably shared for one of the inversequantization, deblocking filtering, and motion compensation, or all ofthe processing. The decoding processing unit for implementing the movingpicture decoding method described in each of embodiments may be sharedfor the processing to be shared, and a dedicated decoding processingunit may be used for processing unique to that of MPEG-4 AVC.

Furthermore, ex1000 in FIG. 62B shows another example in that processingis partly shared. This example uses a configuration including adedicated decoding processing unit ex1001 that supports the processingunique to an aspect of the present disclosure, a dedicated decodingprocessing unit ex1002 that supports the processing unique to anotherconventional standard, and a decoding processing unit ex1003 thatsupports processing to be shared between the moving picture decodingmethod according to the aspect of the present disclosure and theconventional moving picture decoding method. Here, the dedicateddecoding processing units ex1001 and ex1002 are not necessarilyspecialized for the processing according to the aspect of the presentdisclosure and the processing of the conventional standard,respectively, and may be the ones capable of implementing generalprocessing. Furthermore, the configuration of the present embodiment canbe implemented by the LSI ex500.

As such, reducing the scale of the circuit of an LSI and reducing thecost are possible by sharing the decoding processing unit for theprocessing to be shared between the moving picture decoding methodaccording to the aspect of the present disclosure and the moving picturedecoding method in conformity with the conventional standard.

INDUSTRIAL APPLICABILITY

The image coding method and the image decoding method according to thepresent disclosure produce advantageous effects of preventingdeterioration in an image quality and improving processing efficiency,and are applicable to a variety of purposes such as accumulation,transmission, and communication of an image. The image coding method andthe image decoding method according to the present disclosure can beused for, for example, a high-resolution information display device orcapturing device, such as a television, a digital video recorder, a carnavigation, a cellular phone, a digital camera, a digital video camera,and so on, and are useful.

The invention claimed is:
 1. An image decoding method for sampleadaptive offset (SAO) information comprising: performing decoding toconsecutively decode (i) first information indicating whether or not touse, in the SAO processing for a first block of an image, information onthe SAO processing for a second block which is different from the firstblock, (ii) a first bit of second information indicating whether or notto perform the SAO processing for the first block, and (iii) a secondbit of the second information indicating whether the SAO processing forthe first block is (a) edge offset processing performed according to anedge or (b) band offset processing performed according to a pixel value,wherein the first information and the second information are included inSAO information related to the SAO processing for the first block,wherein the performing decoding includes switching, while decoding theSAO information related to the SAO processing for the first block,between (i) context arithmetic decoding using variable probabilities and(ii) bypass arithmetic decoding using a fixed probability, wherein (i)the first information and the first bit of the second information aredecoded by the context arithmetic decoding and (ii) after the firstinformation and the first bit of the second information are decoded bythe context arithmetic decoding, the second bit of the secondinformation is decoded by the bypass arithmetic decoding, wherein thefirst bit of the second information is decoded by the context arithmeticdecoding after the first information is decoded by the contextarithmetic decoding, wherein the performing decoding includes decodingother information, the other information is (i) information on the SAOprocessing for the first block, (ii) different from the firstinformation and the second information, and (iii) decoded by the bypassarithmetic decoding, the other information including third informationindicating an absolute value of an offset value, and wherein when theSAO processing for the first block is the band offset processing, theother information includes (i) fourth information indicating whether theoffset value is positive or negative and (ii) fifth informationindicating a scope of application of the offset value.
 2. An imagedecoding apparatus for sample adaptive offset (SAO) informationcomprising: control circuitry; and storage accessible from the controlcircuitry, wherein the control circuitry performs decoding toconsecutively decode (i) first information indicating whether or not touse, in the SAO processing for a first block of an image, information onthe SAO processing for a second block which is different from the firstblock, (ii) a first bit of second information indicating whether or notto perform the SAO processing for the first block, and (iii) a secondbit of the second information indicating whether the SAO processing forthe first block is (a) edge offset processing performed according to anedge or (b) band offset processing performed according to a pixel value,wherein the first information and the second information are included inSAO information related to the SAO processing for the first block,wherein the decoding includes switching, while decoding the SAOinformation related to the SAO processing for the first block, between(i) context arithmetic decoding using variable probabilities and (ii)bypass arithmetic decoding using a fixed probability, wherein (i) thefirst information and the first bit of the second information aredecoded by the context arithmetic decoding and (ii) after the firstinformation and the first bit of the second information are decoded bythe context arithmetic decoding, the second bit of the secondinformation is decoded by the bypass arithmetic decoding, wherein thefirst bit of the second information is decoded by the context arithmeticdecoding after the first information is decoded by the contextarithmetic decoding, wherein the decoding includes decoding otherinformation, the other information is (i) information on the SAOprocessing for the first block, (ii) different from the firstinformation and the second information, and (iii) decoded by the bypassarithmetic decoding, the other information including third informationindicating an absolute value of an offset value, and wherein when theSAO processing for the first block is the band offset processing, theother information includes (i) fourth information indicating whether theoffset value is positive or negative and (ii) fifth informationindicating a scope of application of the offset value.